Solved exercises on linear systems, matrices, determinants and rank
Twelve exercises with solutions: Gaussian elimination, matrix product and inverse, 3 × 3 and 4 × 4 determinants, Cramer's rule, rank, systems and matrices with a parameter discussed with Rouché-Capelli, matrix equations.
https://www.electronics-engineering.com/en/linear-systems-matrices-determinants-rank-exercises-solved/
Exercises on linear systems, matrices, determinants and rank of the kind set in Geometry and Linear Algebra courses, in three levels: basic, for Gaussian elimination, matrix products and determinants; intermediate, with the inverse by reduction, Cramer’s rule and rank; exam, with systems and matrices depending on a parameter discussed with the Rouché-Capelli theorem, as in written exams. The result is given straight away; the full solution opens with a click.
Basic level
Exercise 1. A 3 × 3 system with Gaussian elimination
Solve the system
![Rendered by QuickLaTeX.com \[ \begin{cases} x + y + z = 6\\ 2x - y + z = 3\\ x + 2y - z = 2 \end{cases} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-d61c4ad32eb36697420565a4f2b9e457_l3.png)
Result:
.
Solution
Write the augmented matrix and clear the entries below the first pivot with
and
:
![Rendered by QuickLaTeX.com \[ \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6\\ 2 & -1 & 1 & 3\\ 1 & 2 & -1 & 2 \end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6\\ 0 & -3 & -1 & -9\\ 0 & 1 & -2 & -4 \end{array}\right) \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-b3ff5f39071c2164625422e6de04f7a9_l3.png)
Swap the second and third rows and do
:
![Rendered by QuickLaTeX.com \[ \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6\\ 0 & 1 & -2 & -4\\ 0 & 0 & -7 & -21 \end{array}\right) \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-6b68f1e3891f8deb067e361583e21aa4_l3.png)
From the bottom:
, so
;
, so
;
, so
. Check in the second equation:
.
Exercise 2. The matrix product is not commutative
Given
and
, compute
and
.
Result:
,
: they are different.
Solution
The entry in position
of the product is the dot product of row
of the first factor with column
of the second. For
: the first row
times the columns
and
gives
and
; the second row
gives
and
.
The meaning is visible too: multiplying on the right by
swaps the columns of
, multiplying on the left swaps the rows. That is why
.
Exercise 3. The inverse of a 2 × 2 matrix
Compute the inverse of
.
Result:
.
Solution
For a 2 × 2 matrix
![Rendered by QuickLaTeX.com \[ \begin{pmatrix} a & b\\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b\\ -c & a \end{pmatrix} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-f3f7b168da90667b7394ff4a8d6dcdc8_l3.png)
Here
, so you only swap the diagonal entries and change the sign of the other two. Check:
.
Exercise 4. A 3 × 3 determinant by Laplace expansion
Compute
.
Result:
.
Solution
It is convenient to expand along the second row, which contains a zero. The signs of the cofactors on the second row are
:
![]()
The rule of Sarrus gives the same value:
.
Intermediate level
Exercise 5. The 3 × 3 inverse with the adjugate matrix
Compute the inverse of
.
Result:
.
Solution
The determinant, expanded along the first column, is
, so
is invertible.
The inverse is
, where the adjugate is the transpose of the matrix of cofactors
. For example
,
,
. Computing the others in the same way and transposing:
![Rendered by QuickLaTeX.com \[ \mathrm{adj}(A) = \begin{pmatrix} 1 & -2 & 2\\ 1 & 1 & -1\\ -1 & 2 & 1 \end{pmatrix} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-7205a480fd2dac2ca612446b8ded7d88_l3.png)
Check with the first row of
times the first column of the adjugate:
, that is
, as it must be.
Exercise 6. Cramer’s rule
Solve with Cramer’s rule
![Rendered by QuickLaTeX.com \[ \begin{cases} 2x + y - z = 1\\ x - y + 2z = 5\\ 3x + 2y + z = 10 \end{cases} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-e7f62e587ac0d2ca25e7d578b85a2fdb_l3.png)
Result:
.
Solution
The determinant of the coefficient matrix is
![Rendered by QuickLaTeX.com \[ D = \det\begin{pmatrix} 2 & 1 & -1\\ 1 & -1 & 2\\ 3 & 2 & 1 \end{pmatrix} = -10 \neq 0 \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-63cb01181ed27e50248ccbd09bdc6d8d_l3.png)
![Rendered by QuickLaTeX.com \[ D_x = \det\begin{pmatrix} 1 & 1 & -1\\ 5 & -1 & 2\\ 10 & 2 & 1 \end{pmatrix} = -10,\quad D_y = \det\begin{pmatrix} 2 & 1 & -1\\ 1 & 5 & 2\\ 3 & 10 & 1 \end{pmatrix} = -20,\quad D_z = \det\begin{pmatrix} 2 & 1 & 1\\ 1 & -1 & 5\\ 3 & 2 & 10 \end{pmatrix} = -30 \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-18abff689e724a502110fb55b8abb94a_l3.png)
and
,
,
.
Exercise 7. The rank of a 3 × 4 matrix
Compute the rank of
.
Result:
.
Solution
Row-reducing with
and
:
![Rendered by QuickLaTeX.com \[ \begin{pmatrix} 1 & 2 & -1 & 3\\ 0 & 0 & 3 & -6\\ 0 & 0 & 3 & -6 \end{pmatrix} \to \begin{pmatrix} 1 & 2 & -1 & 3\\ 0 & 0 & 3 & -6\\ 0 & 0 & 0 & 0 \end{pmatrix} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-2d6806dbe424189c3c8b158c35ac5b30_l3.png)
Two non-zero rows remain: the rank is 2. You can also see it directly: the third row is the sum of the first two, and the second column is twice the first.
Exercise 8. A 4 × 4 determinant by row reduction
Compute
.
Result:
.
Solution
Adding a multiple of one row to another does not change the determinant. With
and
the first column becomes
:
![Rendered by QuickLaTeX.com \[ \det\begin{pmatrix} 1 & 2 & 0 & 1\\ 0 & 1 & 1 & -2\\ 0 & 1 & 3 & 2\\ 0 & -1 & 1 & 0 \end{pmatrix} = \det\begin{pmatrix} 1 & 1 & -2\\ 1 & 3 & 2\\ -1 & 1 & 0 \end{pmatrix} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-2d6e05b715968116af986ff3c9b9e15a_l3.png)
Expanding the 3 × 3 along the first row:
.
Exam level
Exercise 9. A system with a parameter: Rouché-Capelli
Discuss, as
varies, the system
![Rendered by QuickLaTeX.com \[ \begin{cases} x + y + kz = 1\\ x + ky + z = 1\\ kx + y + z = 1 \end{cases} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-4fd90e1b5425940bd3c85c9b95bac919_l3.png)
Result: for
and
a single solution
; for
infinitely many solutions (depending on two parameters); for
no solution.
Solution
The determinant of the coefficient matrix is
![Rendered by QuickLaTeX.com \[ \det\begin{pmatrix} 1 & 1 & k\\ 1 & k & 1\\ k & 1 & 1 \end{pmatrix} = -(k - 1)^2(k + 2) \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-ac1d6f1cebb54c236a3c2a5bdc88f315_l3.png)
If
both matrices have rank 3 and the solution is unique. Because the system is symmetric, look for
: every equation becomes
, so
.
For
the three equations are all
: rank 1 for both the coefficient and the augmented matrix, so
solutions, for example
.
For
the coefficient matrix has rank 2 (the minor
is not zero), while the augmented one has rank 3: adding the three equations gives
. The system has no solution.
Exercise 10. A homogeneous system with non-zero solutions
For which
does the homogeneous system with matrix
have non-zero solutions? Find them.
Result: only for
; the solutions are
,
.
Solution
A square homogeneous system has non-zero solutions if and only if its determinant is zero:
![Rendered by QuickLaTeX.com \[ \det\begin{pmatrix} 1 & 2 & k\\ 2 & k & 1\\ k & 1 & 2 \end{pmatrix} = -(k + 3)(k^2 - 3k + 3) \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-bd03483fc36bfc4da884bc21c3a19ab3_l3.png)
The second factor has discriminant
and never vanishes:
is left. With
row reduction gives the equations
and
(rank 2), so the solution space has dimension
and is spanned by
. Check in the first equation:
.
Exercise 11. A matrix equation
Find the matrix
such that
, with
and
.
Result:
.
Solution
, so
is invertible and you multiply on the left by
(on the left: the product is not commutative):
![]()
Check:
.
Exercise 12. The rank of a matrix with a parameter
Compute the rank of
as
varies.
Result:
for
,
for
.
Solution
Row reduction:
and
, then
:
![Rendered by QuickLaTeX.com \[ \begin{pmatrix} 1 & 2 & 1 & 0\\ 0 & k - 1 & 1 & 1\\ 0 & k - 1 & k - 1 & 1 \end{pmatrix} \to \begin{pmatrix} 1 & 2 & 1 & 0\\ 0 & k - 1 & 1 & 1\\ 0 & 0 & k - 2 & 0 \end{pmatrix} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-bb074ba867de6a2957a64c01aa2f13ac_l3.png)
If
the three rows are independent (also for
: the second row is
, the third
), so the rank is 3. If
the third row vanishes and the rank is 2. Check with minors: columns 1, 2, 3 give
and columns 1, 3, 4 give
; they vanish together only for
.



