# How to calculate the rank of a matrix?

I need to calculate the rank of the matrix $A$, shown below: $$A= \begin{bmatrix} 3 & 2 & -1\\ 2 & -3 & -5\\ -1 & -4 &- 3 \end{bmatrix}$$

I know that I need to calculate $\det(A)$ and if $\det(A) \neq 0$ then the rank will be equal to $3$, but in this case I'm required to zero-out first column of matrix $A$ using element $a_{31} = -1$.

Simply use row reduction: the rank is the number of non-zero rows after you've performed row reduction: \begin{align} &\begin{bmatrix} 3&2&-1\\2&-3&-5\\-1&-4&-3 \end{bmatrix}\rightsquigarrow \begin{bmatrix} 1&4&3\\3&2&-1\\2&-3&-5 \end{bmatrix}\rightsquigarrow \begin{bmatrix} 1&4&3\\0&-10&-10\\0&-11&-11 \end{bmatrix}\\[1ex] \rightsquigarrow&\begin{bmatrix} 1&4&3\\0&1&1\\0&-11&-11 \end{bmatrix}\rightsquigarrow \begin{bmatrix} 1&4&3\\0&1&1\\0&0&0 \end{bmatrix} \end{align} Thus, the rank is $2$.

Note that it was obvious after the second step.

The second column - first column is the last column so the rank is $<3$.

The first two colums are linearly independent so the rank is $2$.

The key word is row echelon form.

• This. I searched way too much for this. Thank you. – Over Killer Jan 2 '17 at 15:05

You can apply linear transformations to $A$ and find an upper triangular matrix. The number of non-zero lines of that matrix will give you the rank of $A$