<s>[INST] How to determine the rank and determinant of $A$? let $A$ be $$A_{a} = \begin{pmatrix} a & 1 & 1 & 1 \\ 1 & a & 1 & 1\\ 1 & 1 & a & 1\\ 1 & 1 & 1 & a \end{pmatrix}$$
How can I calculate the rank of $A$ by the Gauss' methode and $\det A$?
 [/INST] Notice that $A_a= J+aI_4$ with $$J= \left( \begin{matrix} 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \end{matrix} \right)$$ Let $P_J(X)$ be the characteristic polynomial of $J$, then $\det(A_a)=P_J(1-a)$. By noticing:
$$\left( \begin{matrix} 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \end{matrix} \right) \left( \begin{matrix} 1 \\ -1 \\ 1 \\ -1 \end{matrix} \right)= \left( \begin{matrix} 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \end{matrix} \right) \left( \begin{matrix} 1 \\ 1 \\ -1 \\ -1 \end{matrix} \right)=\left( \begin{matrix} 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \end{matrix} \right) \left( \begin{matrix} 1 \\-1 \\ -1 \\ 1 \end{matrix} \right)=0$$
and
$$\left( \begin{matrix} 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \\ 1&1&1&1 \end{matrix} \right) \left( \begin{matrix} 1 \\ 1 \\ 1 \\ 1 \end{matrix} \right)= 4 \left( \begin{matrix} 1 \\ 1 \\ 1 \\ 1 \end{matrix} \right)$$
we can deduce that $P_J(X)=X^3(X-4)$, hence $\det(A_a)=-(1-a)^3(a+3)$. Because $A_a$ is trigonalizable over $\mathbb{C}$, we deduce that:


*

*If $a \neq 1$ and $a \neq -3$, $\mathrm{rank}(A_a)=4$,

*If $a=1$, $\mathrm{rank}(A_a)=1$,

*If $a=-3$, $\mathrm{rank}(A_a)=3$.

</s>