Finding the rank of matrix that has a parameter

gaussian eliminationlinear algebramatricesmatrix-rank

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.

Best Answer

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.