9. Let $a$, $b$, and $\theta$ satisfy the system of equations $\left\{\begin{array}{l}\sin \theta+\cos \theta=a \\ \sin \theta-\cos \theta=b \\ \sin ^{2} \theta-\cos ^{2} \theta-\sin \theta=-b^{2}\end{array}\right.$ Find the values of $a$ and $b$.
$$
\begin{array}{c}
\left\{\begin{array} { l } 
{ a ^ { 2 } + b ^ { 2 } = 2 } \\
{ ( \frac { a + b } { 2 } ) ^ { 2 } - ( \frac { a - b } { 2 } ) ^ { 2 } - \frac { a + b } { 2 } = - b ^ { 2 } }
\end{array} \Rightarrow \left\{\begin{array}{l}
a^{2}+b^{2}=2 \\
a b-\frac{1}{2}(a+b)=-b^{2}
\end{array}\right.\right. \\
\Rightarrow\left\{\begin{array} { l } 
{ a ^ { 2 } + b ^ { 2 } = 2 } \\
{ 2 a b - ( a + b ) + 2 b ^ { 2 } = 0 }
\end{array} \Rightarrow \left\{\begin{array}{l}
a^{2}+b^{2}=2 \\
a(2 b-1)+b(2 b-1)=0
\end{array}\right.\right. \\
\Rightarrow\left\{\begin{array} { l } 
{ a ^ { 2 } + b ^ { 2 } = 2 } \\
{ ( 2 b - 1 ) ( a + b ) = 0 }
\end{array} \Rightarrow \left\{\begin{array} { l } 
{ a ^ { 2 } + b ^ { 2 } = 2 } \\
{ 2 b - 1 = 0 }
\end{array} \text { or } \left\{\begin{array}{l}
a^{2}+b^{2}=2 \\
a+b=0 .
\end{array}\right.\right.\right. \\
\left\{\begin{array} { l } 
{ a = \frac { \sqrt { 7 } } { 2 } } \\
{ b = \frac { 1 } { 2 } }
\end{array} \text { or } \left\{\begin{array} { l } 
{ a = - \frac { \sqrt { 7 } } { 2 } } \\
{ b = \frac { 1 } { 2 } }
\end{array} \text { or } \left\{\begin{array} { l } 
{ a = 1 } \\
{ b = - 1 }
\end{array} \text { or } \left\{\begin{array}{l}
a=-1 \\
b=1 .
\end{array}\right.\right.\right.\right.
\end{array}
$$