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$?
 A: $\det A_{a} =\det \begin{pmatrix} a & 1 & 1 & 1 \\ 1 & a & 1 & 1\\ 1 & 1 & a & 1\\ 1 & 1 & 1 & a \end{pmatrix}$
Adding all the columns to the 1st column we have,
$\det A_{a} = \det \begin{pmatrix} a+1+1+1 & 1 & 1 & 1 \\ a+1+1+1 & a & 1 & 1\\ a+1+1+1 & 1 & a & 1\\ a+1+1+1 & 1 & 1 & a \end{pmatrix}$
Taking $a+1+1+1$ common from row 1 we have,
$\det A_{a} = (a+1+1+1)\det \begin{pmatrix}1 & 1 & 1 & 1 \\ 1 & a & 1 & 1\\ 1 & 1 & a & 1\\ 1 & 1 & 1 & a \end{pmatrix}$
Now subtract the 1st row from the 2nd row 1st from the third and so on to get
$\det A_{a} = (a+1+1+1)\det \begin{pmatrix}1 & 1 & 1 & 1 \\ 0 & a & 1 & 1\\ 0 & 1 & a & 1\\ 0 & 1 & 1 & a \end{pmatrix}$
Now it will be easy.
After finding determinant of A find out the values of A for which the determinant is $0$.For those values of A find the rank of the matrix by noting the number of independent row of $A$ otherwise the rank is $4$.
A: We know that this matrix is equivalent to $$B=\begin{pmatrix}a&0&0&1-a\\1&a-1&0&0\\1&1-a&a-1&0\\1&0&1-a&a-1\end{pmatrix}$$
and $$\det(B)=a(a-1)^3-(1-a)((1-a)^2-(a-1)((1-a)-(a-1))=(a-3)(a-1)^3$$ and $\text{rank}(A)=4$ for all values of $a$ except $1$ and $3$.
A: 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$

A: 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$.

