Since the characteristic poylynomial has degree 4, A must be a 4 by 4 matrix. However, knowing only that the characteristic polynomial is \(\displaystyle (\lambda- 2)^2(\lambda+ 1)^2\), that 2 and -1 are eigenvalues both with "algebraic multiplicity" 2 there 4 different Jordan forms possible. Which one depends on the "geometric multiplicity" of the eigenvalues. It is easy to show that the set of all eigenvectors corresponding to a given eigenvalue is a subspace. The "geometric multiplicity" of an eigenvalue is the dimension of that subspace. The "geometric multiplicity" of an eigenvalue is always less than or equal to its algebraic multiplicity.

One such matrix is the diagonal matrix you give:

\(\displaystyle \begin{bmatrix}2 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & -1\end{bmatrix}\).

This would be the case if both \(\displaystyle E_2\) and \(\displaystyle E_{-1}\) have dimension 2. \(\displaystyle E_2\) is the subspace of all eigenvectors corresponding to eigenvalue 2 and \(\displaystyle E_{-1}\) is the subspace or eigenvectors corresponding to eigenvalue -1. If both those spaces have dimension 2, the geometric multiplicity of both eigenvalues is 2, we can find two independent vectors that are eigenvectors corresponding to each eigenvalue so 4 independent vectors. Using those as basis vectors gives this diagonal matrix.

If the dimension of the space of eigenvectors corresponding to eigenvalue 2 is 2 but the dimension of the space of eigenvectors corresponding to eigenvalue -1 is only 1, that is that dim(E_2)= 2 and dim(E_{-1})= 1, the best we can do is the Jordan form

\(\displaystyle \begin{bmatrix}2 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & -1 & 1 \\ 0 & 0 & 0 & -1\end{bmatrix}\).

If the dimension of the space of eigenvectors corresponding to eigenvalue 2 is 1 but the dimension of the space of eigenvectors corresponding to eigenvalue -1 is 2, that is that dim(E_2)= 1 and dim(E_{-1})= 2, the best we can do is the Jordan form

\(\displaystyle \begin{bmatrix}2 & 1 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & -1\end{bmatrix}\).

Finally, If the dimension of the space of eigenvectors corresponding to both eigenvalues 2 and 1 is only 1, that is that dim(E_2)= 1 and dim(E_{-1})= 1, the best we can do is the Jordan form

\(\displaystyle \begin{bmatrix}2 & 1 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & -1 & 1 \\ 0 & 0 & 0 & -1\end{bmatrix}\).