<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] Add all the columns to the first and we find
$$ B=\begin{pmatrix} a+3 & 1 & 1 & 1 \\ a+3 & a & 1 & 1\\ a+3 & 1 & a & 1\\ a+3 & 1 & 1 & a \end{pmatrix}$$
then subtract the first row from the other we find
$$ C=\begin{pmatrix} a+3 & 1 & 1 & 1 \\ 0 & a-1 & 0 & 0\\ 0 & 0 & a-1 & 0\\ 0 & 0 & 0 & a-1 \end{pmatrix}$$
hence 
$$\det A_a=\det C=(a+3)(a-1)^3$$
and note that the elementary operation preserve the rank so


*

*if $a\neq -3$ and $a\neq 1$ then $\mathrm{rank}A_a=4$

*if $a=1$ then $\mathrm{rank}A_1=1$

*if $a=-3$ then $\mathrm{rank}A_{-3}=3$

</s>