9. A. If $y=\sqrt{1-x}+\sqrt{x-\frac{1}{2}}$ has a maximum value of $a$ and a minimum value of $b$, then the value of $a^{2}+b^{2}$ is $\qquad$.
9. A. $\frac{3}{2}$.

From $1-x \geqslant 0$ and $x-\frac{1}{2} \geqslant 0$, we get
$$
\frac{1}{2} \leqslant x \leqslant 1 \text {. }
$$

Then $y^{2}=\frac{1}{2}+2 \sqrt{-x^{2}+\frac{3}{2} x-\frac{1}{2}}$ $=\frac{1}{2}+2 \sqrt{-\left(x-\frac{3}{4}\right)^{2}+\frac{1}{16}}$.
Since $\frac{1}{2}<\frac{3}{4}<1$, therefore,
when $x=\frac{3}{4}$, $y^{2}$ reaches its maximum value 1, so $a=1$;
when $x=\frac{1}{2}$ or 1, $y^{2}$ reaches its minimum value $\frac{1}{2}$, so $b=\frac{\sqrt{2}}{2}$.
Thus, $a^{2}+b^{2}=\frac{3}{2}$.