# Find $x$ such that $A$ is similar to $B$

For what $x$ are the following two matrices similar?

$$A = \begin{pmatrix} 3&0&-1 \\ -2&1&1 \\ 2&0&0 \end{pmatrix}, B = \begin{pmatrix} 1&x&0 \\ 0&1&0 \\ -1&x&2 \end{pmatrix}$$

I know some necessary conditions for two matrices to be similar. For example, same eigenvalues, same characteristic polynomial. In this case, the characteristic polynomials of both matrices are $(1-\lambda)^2(2-\lambda)$. But this does not tell me anything about $x$?

Since $A$ is similar $B$ so $A,B$ have the same characteristic and also same minimal polynomial.

Check that minimal polynomial of $A$ is $(x-2)(x-1)$.

So $B$ satisfies $(B-2I)(B-I)=0\implies x=0$

• How did you find the minimal polynomial of $A$ so quickly (if that's the case)? – 3x89g2 Nov 5 '16 at 16:46
• quickly,what? I had to compute it;took 10 minutes – Learnmore Nov 5 '16 at 16:50
• fair enough. thank you :) – 3x89g2 Nov 5 '16 at 16:50
• @learnmore, x can be anynumber for A and B are similars. – retro_var Nov 5 '16 at 19:03
• @testpilot Why? – 3x89g2 Nov 5 '16 at 22:24

There is a general method to determine whether two matrices are similar, which involves computing and comparing the Rational Canonical Form of the two matrices; however this is rather a lot of work (and in addition does not play well with the presence of undetermined entries like $x$) while one can do a lot better in small size examples like this one.

You calculated the characteristic polynomials and found both to be $(X-1)^2(X-2)$, independently of$~x$. The eigenvalue $\lambda=2$ will necessarily given an eigenspace of dimension$~1$ and causes no concern. For the eigenvalue $\lambda=1$ with algebraic multiplicity$~2$ you will have a generalised eigenspace $\ker((M-I)^2)$ that has dimension$~2$ for both matrices$~M$, but two possibilities exist for the (ordinary) eigenspace $\ker(M-I)$: either it is a subspace of dimension$~1$ of the generalised eigenspace, or (much less likely) it has dimension$~2$ and fills the generalised eigenspace. You can check that the latter happens for $M=A$ (the vectors $(0,1,0)$ and $(1,0,2)$ generate the eigenspace, but not for$~B$ (the vector $(1,0,1)$ spans the kernel) except when $x=0$, in which case (for instance) $(0,1,0)$ which always belongs to the generalised eigenspace actually belong to$~\ker(B-I)$.

In conclusion, for $x\neq0$ one has $A$ diagonalisable but $B$ not, so they are not similar. But for $x=0$ both matrices are diagonalisable, and also having the same characteristic polynomial, they are clearly similar.