I want to diagonalize this matrix $B$ with a parameter $k$:
$$\begin{pmatrix} 5+k & -4-2k & 4+2k & -9-4k \\ 2+2k & 1 & 2 & -4-2k \\ 7 & -5-2k & 8+2k & -15-3k \\ 4 & -4-2k & 4+2k & -8-3k \end{pmatrix}$$
for all values of $k$. I calculated the characteristic polynomial and found that the spectrum of $B$ is $\{1+k,-k,2,3\}$.
I am perfectly capable of diagonalizing $B$ for every value of $k$, but the struggle is time: there are a lot of matrices that have to be row reduced in order to find a dimension or a basis.
For instance, if $k \in \{1,2,-2,-2\}$, you'll have to rowreduce the eigenspace of resp. eigenvalues $2, 3, 2, 3$ to check multiplicities. I found that $B$ is diagonalizable if $k \in \mathbb{R} \setminus \{1\}$.
Then, I'll have to row reduce the four eigenspaces again for a $k \in \mathbb{R} \setminus \{2,-2,-3\}$ in order to find a basis for them to write the equation $\Lambda = P^{-1} \cdot B \cdot P$. After that, I have to find a basis of the odd eigen space for $k = 2, k=-2,k=-3$ (with the odd eigenspace, I mean the eigenspaces of resp. eigenvalues $2,3,2$, which have a multiplicity $> 1$), in order to find the $P$ matrices and thus the eigenvectors.
In total, there are 12 row reductions to be done, including matrices with parameters which is an extra struggle. Is there a faster way to achieve the same result with less work?