Back to homeMathematics · 2nd Bach. Science · Change subject
Start for free
BAC2 tech · Mathematics
Systems of linear equations · Systems

Solving systems and Cramer's rule

Until now, to solve a system with three unknowns you used Gauss to reduce it to triangular form. Cramer's rule offers a direct formula: each unknown is a quotient of two determinants. It does not replace Gauss —there are systems where Gauss is quicker— but it is essential when the system contains a parameter, because it lets you solve for the unknowns without following every step of the triangulation.

Before you start, make sure you know: Gaussian elimination (1st Bachillerato)

Cramer system: when $|A| \ne 0$

Decision diagram depending on whether the determinant of the coefficient matrix is non-zero (Cramer system) or zero |A| ≠ 0 Cramer system → unique solution |A| = 0 cannot be applied
Practice★☆☆Not started
A nutritionist designs a personalised diet for an athlete by combining three types of food ($A, B$ and $C$). The amounts of protein, carbohydrates and fats per unit of…

A nutritionist designs a personalised diet for an athlete by combining three types of food ($A, B$ and $C$). The amounts of protein, carbohydrates and fats per unit of food are given by the following system of equations, where $x, y, z$ represent the units of each food required to reach the daily targets:

$\begin{cases} 2x + y + z = 7 \\ x + 2y + z = 8 \\ x + y + 2z = 9 \end{cases}$

  1. a) Write down the coefficient matrix $A$ and the augmented matrix $A^*$.
  2. b) Verify that the system is a Cramer system by calculating the determinant of $A$.
  3. c) Find the value of the unknown $x$ applying exclusively Cramer's rule.
Solve

Cramer's rule

Construction of the modified matrices by replacing columns to apply Cramer's rule in a two-by-two system A = | 1 2 | Ax = | 8 2 | Ay = | 1 8 | | 2 1 | | 3 1 | | 2 3 | x = |Ax| / |A| y = |Ay| / |A| system: x + 2y = 8, 2x + y = 3
Practice★☆☆Not started
Two friends, Lucía and Marcos, are comparing their subscriptions to streaming platforms. Lucía pays a total of $16$ € per month for one "Cinema" plan and two "Series"…

Two friends, Lucía and Marcos, are comparing their subscriptions to streaming platforms. Lucía pays a total of $16$ € per month for one "Cinema" plan and two "Series" plans. Marcos, for his part, has two "Cinema" plans and one "Series" plan for $17$ € per month. The figure summarises the plans each of them has.

  1. a) Express the situation as a system of two equations with two unknowns (let $x$ be the monthly price of the Cinema plan and $y$ that of the Series plan).
  1. b) Calculate the determinant of the coefficient matrix.
  1. c) Solve the system using Cramer's Rule to find the monthly price of each plan.
Plans subscribed to by Lucía (1 Cinema and 2 Series, 16 €) and by Marcos (2 Cinema and 1 Series, 17 €)C = Cinema planS = Series planLucíaC+SS=16 €MarcosCC+S=17 €
Solve

Cramer's rule with three unknowns

The procedure is identical for a $3\times3$ system: four determinants of order $3$ ($|A|$, $|A_x|$, $|A_y|$, $|A_z|$) instead of three of order $2$. The workload grows, but the logic —replace a column and divide— does not change.

Formulae of Cramer's rule for three unknowns and replacement of each column by the column of constant terms x = |Ax|/|A| y = |Ay|/|A| z = |Az|/|A| Ax, Ay, Az are A with column 1, 2 or 3 replaced by the column of constant terms
Practice★☆☆Not started
In an esports tournament, points are awarded for matches won ($x$), drawn ($y$) and for secondary objectives completed ($z$). A team obtained the following results over…

In an esports tournament, points are awarded for matches won ($x$), drawn ($y$) and for secondary objectives completed ($z$). A team obtained the following results over three matchdays:

  • Matchday 1: $1$ win, $1$ draw and $1$ secondary objective = $10$ points.

  • Matchday 2: $2$ wins and $1$ draw = $13$ points.

  • Matchday 3: $1$ win and $2$ secondary objectives = $11$ points.

  1. a) Set up the associated system of equations.
  2. b) Solve it using Cramer's rule to determine how many points each category is worth.
Matchday Wins (x) Draws (y) Objectives (z) Points M1 x + y + z = 10 M2 x x + y + 0 = 13 M3 x + 0 + z z = 11
Solve
Practice★★☆Not started
Solve the following system of linear equations using Cramer's rule: $\begin{cases} 2x - y + z = 3 \\ x + 2y - z = 4 \\ 3x - y + 2z = 8 \end{cases}$ To do this, first…

Solve the following system of linear equations using Cramer's rule:

$\begin{cases} 2x - y + z = 3 \\ x + 2y - z = 4 \\ 3x - y + 2z = 8 \end{cases}$

To do this, first identify the coefficient matrix $A$ and calculate its determinant. Then, obtain the determinants of the auxiliary matrices $A_x$, $A_y$ and $A_z$ to find the values of the unknowns.

2x - y + z = 3 x + 2y - z = 4 3x - y + 2z = 8 |A| = 2 −1 1 1 2 −1 3 −1 2 |Aₓ| = 3 −1 1 4 2 −1 8 −1 2 x = |Aₓ|/|A| , y = |Ay|/|A| , z = |Az|/|A|
Solve

Cramer's rule in problems and matrix equations

Cramer's rule is also useful for finding a single unknown without calculating the others: if you are only asked for $z$, $|A|$ and $|A_z|$ are enough. This is especially useful within larger problems, such as when solving for a column in a matrix equation.

Saving on calculations when applying Cramer's rule to find a single unknown Only need y? Calculate |A| and |Ay| no need for |Ax| or |Az| you save two determinants
Practice★★★Not started
Given the matrices $A = \begin{pmatrix} 1 & 0 & 2 \\ 0 & 1 & 1 \\ m & 0 & 1 \end{pmatrix}$ and $B = \begin{pmatrix} 1 & 1 \\ 0 & 1 \\ 1 & 0 \end{pmatrix}$: a) Determine…

Given the matrices $A = \begin{pmatrix} 1 & 0 & 2 \\ 0 & 1 & 1 \\ m & 0 & 1 \end{pmatrix}$ and $B = \begin{pmatrix} 1 & 1 \\ 0 & 1 \\ 1 & 0 \end{pmatrix}$:

  1. a) Determine the values of the real parameter $m$ for which the matrix $A$ is invertible.
  2. b) For $m = 0$, solve the matrix equation $A \cdot X + B = 2B$, where $X$ is a matrix of appropriate dimensions.
  3. c) Set up a system of equations to calculate the first column of the matrix $X$ and solve it using Cramer's rule.
Solve

Summary

See all the exercises in this section