Uniqueness of a $2\times 2$ real symmetric matrix under certain conditions. Let $a$ and $b$ be real numbers. We are to show that there exists a unique $2\times 2$ real symmetric matrix $A$ with $\operatorname{tr}(A)=a$ and $\det(A)=b$ if and only if $a^2=4b$.
Now I know that if $\lambda_1$ and $\lambda_2$ are eigenvalues of a real $2\times 2$ symmetric matrix $A$ with $\operatorname{tr}(A)=a$ and $\det(A)=b$ then $\lambda_1+\lambda_2=a$ and $\lambda_1\lambda_2=b$. But I am absolutely lost while proving uniqueness when $a^2=4b$. I am also unable to use the property that $A$ is symmetric. Please help. This is a Masters level entrance examination question.
 A: Here is a simpler but not enlightening approach. Let $A=\pmatrix{x&y\\ y&z}$. For the on "only if" part, note that $B=\pmatrix{z&-y\\ -y&x}$ has the same trace and determinant as $A$. For the "if" part, when $\operatorname{tr}(A)^2=4\det(A)$, what are the implications for the values of $x,y,z$?
A: Hint: Since $A$ is symmetric, it is diagonalizable. 
Write 
$$A=PDP^{-1}$$
with $P$ invertible. Show that an unique $A$ exists if and only if $D$ commutes with all the invertible matrices. 
A: We can use Cayley-Hamilton equation   for checking uniqueness (is it really unique?)  when $a^2=b/4$.
$A^2-\text{tr}(A)A+\det(A)I=0$    
With $a^2=b/4$ we have 
$A^2-a A+(a^2/4)I=0$    
$4A^2-  4aA +a^2I=(2A-aI)^2=0$    
Now we know that $A$ is symmetric so $2A-aI$. 
Which   symmetric matrix squared would give $0$ ?
Only $A=aI/2$ i.e. multiply of identity which is also constrained with determinant.    
Solution is not unique.. there are plenty of such symmetric matrices type $cI$.
But if $a$ is specified there is of course only one matrix of type $cI$.
A: The "only if" part  (That is, we are considering that $A$ is unique)
To Show: $a^2=4b$ (under the conditions given)
Consider $A$ to be a real symmetric matrix such that  $$ A = \left[ \begin{array}{cccc}
\alpha_1 & \alpha_2  \\
\alpha_2 & \alpha_3 \\
 \end{array} \right] $$
($\alpha_1,\alpha_2,\alpha_3,\alpha_4 $ are all real)  
Now, $trace(A)=\lambda_1+\lambda_3=a$
$|A|=\alpha_1\times\alpha_3-{\alpha_2}^2=b$ 
If, $\lambda_1,\lambda_2$ be the characteristic root of $A$ then the characteristic equation of $A$ is of the form 
$(\lambda-\lambda_1)(\lambda-\lambda_1)=0$
$\Rightarrow \lambda^2-(\lambda_1+\lambda_2)\lambda+\lambda_1\lambda_2=0$
$\Rightarrow \lambda^2-tr(A)\lambda+|A|=0$
$\Rightarrow \lambda^2-a\lambda+ b=0$ 
By Cayley-Hamilton Theorem,
$A^2-tr(A)\lambda+|A|=0$
$\Rightarrow A^2-(\lambda_1+\lambda_2)A+|A|=0$
$\Rightarrow (A-\lambda_1I)(A-\lambda_2I)=0$ 
Since $A$ is unique we must have $\lambda_1=\lambda_2$ 
That is, the characteristic equation should have equal roots.
By applying theory of equations, we have,
the characteristic equation has equal roots if
$a^2-4b=0$
$\Rightarrow a^2=4b$ 
The if part:  
Suppose $a^2=4b$
To show, $A$ is unique   
Now, solving the characteristic equation, we have  
$\lambda^2-tr(A)\lambda+|A|=0$ 
$\lambda=\frac{a \pm \sqrt{a^2-4b}}{2}$ 
So, $\lambda_1=  \frac{a + \sqrt{a^2-4b}}{2}$
$\lambda_2=  \frac{a - \sqrt{a^2-4b}}{2}$ 
But, since $a^2=4b$, so
$\lambda_1=\frac{a}{2}=\lambda_2$ 
Again, $A=\lambda_1I$, or $A=\lambda_2I$
Since, $\lambda_1=\lambda_2=\frac{a}{2}$,  
$A=\frac{a}{2}I$
$\Rightarrow$ $A$ is unique   
