Given $A = \begin{bmatrix} 2 & 1 \\ -1 & a \end{bmatrix}$, how do we find smallest value for $a$ such that both eigenvalues are the same? Is there a special property of $A$ which helps to determine this?
I threw $(2 - \lambda)(a - \lambda) + 1$ into Wolfram to find the roots at $\frac{1}{2} (2 - \sqrt{-4 + a} \sqrt{a} + a)$ and then asked Wolfram to minimise $a$, giving $a=0$, but I have no idea how I would do this by hand.
Hint: if $a \ne 0$, then the quadratic equation $ax^2+bx+c=0$ has two repeated solutions if and only $b^2-4ac = 0$.
Apply this result to the quadratic $\lambda^2 - (2+a)\lambda + (2a+1)=0$.