# Finding the rank of matrix that has a parameter

Find the rank of the following matrix. $$A_\lambda = \begin{pmatrix} 2\lambda &-1&2\\ -2&1+\lambda&2-3\lambda\\ -3&-1&5 \end{pmatrix}$$

When finding the rank of matrix, I am allowed to use elementary row and column operations. But I am not sure if I can multiply by $\lambda$. I want to reduce this to an upper triangular matrix, but I always fail. Can you help me with the thinking process when solving this kind of problems?

After reducing it to triangular, the number of non-zero elements is the rank of the matrix.

• When $\lambda=0$ you have full rank; when $\lambda \neq 0$ you can multiply by $\lambda$ Aug 18, 2018 at 17:04
• @cdipaolo that was what i thought Aug 18, 2018 at 17:05
• @SergioParreiras even with multiplying with lambda i cant solve this Aug 18, 2018 at 17:09
• I don't think multiplying with $\lambda$ would help! Instead, you can eliminate $\lambda$ from certain terms by elementary Row column operations! For eg - To eliminate the $\lambda$ from the term $a_{22}$ You may use $C_2 \rightarrow C_2 +\frac{C_3}{3}$. Aug 18, 2018 at 17:18

Using SymPy:

>>> from sympy import *
>>> t = Symbol('t')
>>> A = Matrix([[ 2*t,  -1,     2],
[  -2, 1+t, 2-3*t],
[  -3,  -1,     5]])


Computing the determinant as a function of $t$:

>>> simplify(A.det())
4*t**2 + 11*t + 6


Finding for which values of $t$ the determinant vanishes:

>>> solve(4*t**2 + 11*t + 6,t)
[-2, -3/4]


For $t=-2$ we obtain a rank-$2$ matrix:

>>> A.subs(t,-2)
Matrix([[-4, -1, 2],
[-2, -1, 8],
[-3, -1, 5]])
>>> A.subs(t,-2).rank()
2


For $t=-\frac 34$ we obtain another rank-$2$ matrix:

>>> A.subs(t,-Rational(3,4))
Matrix([[-3/2,  -1,    2],
[  -2, 1/4, 17/4],
[  -3,  -1,    5]])
>>> A.subs(t,-Rational(3,4)).rank()
2


For other values of $t$, the rank is $3$, of course.