Skip to main content
\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)
International Baccalaureate · DP 2: Applications and Interpretation HL

Matrices

⌚ ~186 min ▢ 21 blocks ✓ 74 exercises
I Structure
I.1 Definition
Matrices are rectangular arrays of numbers that provide a powerful tool for solving systems of linear equations and for representing linear transformations. Just as complex numbers extend the real numbers, matrices can be viewed as a generalisation of numbers to higher dimensions. Matrices have algebraic foundations, operations, and a fundamental role in a variety of mathematical and scientific applications. Unless stated otherwise, matrix entries are real numbers.
Report an error
Definition — Matrix
A matrix \(\mathbf{A}\) of size \(n\times p\) is a rectangular array of numbers with \(n\) rows and \(p\) columns: $$ \mathbf{A}=\begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1p}\\ a_{21} & a_{22} & \cdots & a_{2p}\\ \vdots & \vdots & & \vdots\\ a_{n1} & a_{n2} & \cdots & a_{np}\\ \end{pmatrix}. $$ \(a_{ij}\) is called the entry or element of \(\mathbf{A}\) at position \((i,j)\) (in the \(i\)-th row and \(j\)-th column).
Example
\(\mathbf{A}=\begin{pmatrix}1&3&5 \\7&2&6\\ \end{pmatrix}\) has 2 rows and 3 columns, so its size is \(2\times 3\).
The entry \(a_{\textcolor{colordef}{1}\textcolor{colorprop}{3}}\) is equal to \(5\). It is located in row \(\textcolor{colordef}{1}\) and column \(\textcolor{colorprop}{3}\).
Figure
Skills to practice
  • Definition
I.2 Special Matrices
Definition — Column Matrix
A matrix with one column, \(\begin{pmatrix}c_{1}\\c_{2}\\ \vdots\\c_{n} \end{pmatrix}\), is called a column matrix or column vector.
Example
\(\mathbf{C}=\begin{pmatrix}1\\3 \\-1\\\end{pmatrix}\) has 3 rows and 1 column. \(\mathbf{C}\) is a column matrix of size \(3\times 1\).
Definition — Row Matrix
A matrix with one row, \(\begin{pmatrix}r_{1}&r_{2}& \dots &r_{p} \end{pmatrix}\), is called a row matrix or row vector.
Example
\(R=\begin{pmatrix}1&3 &-1\\\end{pmatrix}\) has 1 row and 3 columns. \(R\) is a row matrix of size \(1\times 3\).
Definition — Square Matrix
A matrix with the same number of rows and columns is called a square matrix. A square matrix of size \(n \times n\) is said to be of order \(n\): $$ \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n}\\ a_{21} & a_{22} & \cdots & a_{2n}\\ \vdots & \vdots & \ddots & \vdots\\ a_{n1} & a_{n2} & \cdots & a_{nn}\\ \end{pmatrix}. $$
Example
\(\mathbf{A}=\begin{pmatrix}1&3 \\2&5\end{pmatrix}\) has 2 rows and 2 columns. \(\mathbf{A}\) is a square matrix of order \(2\).
Definition — Zero Matrix
A matrix where all entries are zero is called a zero matrix or null matrix.
It is denoted \(\mathbf{0}_{n,p}\) if it has \(n\) rows and \(p\) columns, or simply \(\mathbf{0}\) if the size is clear from the context.
Example
\(\mathbf{0}_{2,3}=\begin{pmatrix}0&0&0 \\0&0&0\end{pmatrix}\).
Definition — Identity Matrix
The identity matrix, denoted \(\mathbf{I_n}\) or \(\mathbf{I}\), is a square matrix of order \(n\) with ones on the main diagonal and zeros elsewhere: $$ \mathbf{I_n}=\begin{pmatrix} 1&0&\cdots &0\\ 0&1&\ddots &\vdots \\ \vdots &\ddots &\ddots &0\\ 0&\cdots &0&1 \end{pmatrix}. $$
Example
\(\mathbf{I_3}=\begin{pmatrix}1&0&0 \\0&1&0\\0 & 0 &1 \\\end{pmatrix}\) is the identity matrix of order \(3\).
Definition — Opposite Matrix
The opposite matrix of \(\mathbf{A}\), denoted \(-\mathbf{A}\), is the matrix where each entry is the additive inverse of the corresponding entry in \(\mathbf{A}\): $$ -\mathbf{A}=\begin{pmatrix} -a_{11} & \cdots & -a_{1p}\\ \vdots & & \vdots\\ -a_{n1} & \cdots & -a_{np} \end{pmatrix}. $$
Example
Find the opposite matrix of \(\mathbf{A}=\begin{pmatrix}1&3&-5 \\7&-2&6\\ \end{pmatrix}\).

\(-\mathbf{A}=\begin{pmatrix}-1&-3&5 \\-7&2&-6\\ \end{pmatrix}\)

Skills to practice
  • Special Matrices
I.3 Equality
Definition — Equality of Matrices
Two matrices \(\mathbf{A}\) and \(\mathbf{B}\) are equal, written as \(\mathbf{A}=\mathbf{B}\), if they have:
  • the same number of rows,
  • the same number of columns,
  • and their corresponding entries are equal.
Example
$$\begin{pmatrix}1^2&2^2\\ 3^2&4^2\end{pmatrix}=\begin{pmatrix}1&4\\ 9&16\end{pmatrix}$$ and $$\begin{pmatrix}0&0\\ 0&0\\ 0&0\\ \end{pmatrix}\neq\begin{pmatrix}0&0\\ 0&0\\ \end{pmatrix}$$
Skills to practice
  • Recognising Special and Equal Matrices
II Matrix Operations
II.1 Matrix Addition
Definition — Matrix Addition
Let \(\mathbf{A}\) and \(\mathbf{B}\) be two matrices of the same size \(n\times p\).
The sum \(\mathbf{A}+\mathbf{B}\) is the matrix obtained by adding the corresponding entries of \(\mathbf{A}\) and \(\mathbf{B}\): $$ \begin{pmatrix} a_{11} & \cdots & a_{1p}\\ \vdots & & \vdots\\ a_{n1} & \cdots & a_{np} \end{pmatrix} + \begin{pmatrix} b_{11} & \cdots & b_{1p}\\ \vdots & & \vdots\\ b_{n1} & \cdots & b_{np} \end{pmatrix} = \begin{pmatrix} a_{11}+b_{11} & \cdots & a_{1p}+b_{1p}\\ \vdots & & \vdots\\ a_{n1}+b_{n1} & \cdots & a_{np}+b_{np} \end{pmatrix}. $$
Example
\(\begin{aligned}[t] \begin{pmatrix}0 &1 & 2 \\3 &4 & 5 \\\end{pmatrix} +\begin{pmatrix}-2 &-1 & 1 \\0 & 1 & 0 \\\end{pmatrix} &=\begin{pmatrix}0-2 &1-1 & 2+1\\3+0 & 4+1 & 5+0\\\end{pmatrix}\\ &=\begin{pmatrix}-2 &0 & 3\\3 & 5 & 5\\\end{pmatrix} \end{aligned}\)
Proposition — Properties of Matrix Addition
Let \(\mathbf{A}, \mathbf{B}, \mathbf{C}\) be three matrices of the same size.
  • Commutativity: \(\mathbf{A}+\mathbf{B}=\mathbf{B}+\mathbf{A}\)
  • Associativity: \((\mathbf{A}+\mathbf{B})+\mathbf{C}=\mathbf{A}+(\mathbf{B}+\mathbf{C})\)
  • Identity Element: The zero matrix \(\mathbf{0}\) is the identity element for addition: \(\mathbf{A}+\mathbf{0}=\mathbf{0}+\mathbf{A}=\mathbf{A}\)
  • Inverse Element: \(\mathbf{A}+(-\mathbf{A})=0\).
As with real numbers, subtraction is defined as adding the opposite matrix, which is equivalent to subtracting the corresponding entries one by one.
Report an error
Definition — Matrix Subtraction
Let \(\mathbf{A}\) and \(\mathbf{B}\) be two matrices of the same size \(n\times p\).
The difference \(\mathbf{A}-\mathbf{B}\) is the matrix obtained by subtracting the corresponding entries of \(\mathbf{B}\) from \(\mathbf{A}\): $$\mathbf{A}-\mathbf{B}=\mathbf{A}+(-\mathbf{B}).$$
Example
\(\begin{aligned}[t] \begin{pmatrix}0 &1 \\3 &4 \\\end{pmatrix} -\begin{pmatrix}-2 &-1 \\0 & 1 \\\end{pmatrix} &=\begin{pmatrix}0-(-2) &1-(-1)\\3-0 & 4-1\\\end{pmatrix}\\ &=\begin{pmatrix}2 &2\\3 & 3\\\end{pmatrix} \end{aligned}\)
Skills to practice
  • Matrix Addition
II.2 Scalar Multiplication
Definition — Scalar Multiplication
Let \(\mathbf{A}\) be a matrix of size \(n\times p\) and \(\lambda\) be a scalar.
The product \(\lambda \mathbf{A}\) is the matrix obtained by multiplying each entry of \(\mathbf{A}\) by \(\lambda\): $$ \lambda \begin{pmatrix} a_{11} & \cdots & a_{1p}\\ \vdots & & \vdots\\ a_{n1} & \cdots & a_{np} \end{pmatrix} = \begin{pmatrix} \lambda a_{11} & \cdots & \lambda a_{1p}\\ \vdots & & \vdots\\ \lambda a_{n1} & \cdots & \lambda a_{np} \end{pmatrix}. $$
Example
\(\begin{aligned}[t] 2\begin{pmatrix}0 &1 & 2 \\3 &4 & 5 \\\end{pmatrix} &=\begin{pmatrix}2\times 0 &2\times 1 & 2\times 2 \\2\times 3 &2\times 4 & 2\times 5 \\\end{pmatrix}\\ &=\begin{pmatrix}0 &2 & 4 \\6 &8 & 10 \\\end{pmatrix} \end{aligned}\)
Proposition — Properties of Scalar Multiplication
Let \(\mathbf{A},\mathbf{B}\) be two matrices of the same size and \(\lambda,\mu\) be two scalars.
Then,
  • \(\lambda(\mathbf{A} + \mathbf{B}) = \lambda \mathbf{A} + \lambda \mathbf{B}\)
  • \((\lambda+ \mu)\mathbf{A} = \lambda \mathbf{A} + \mu \mathbf{A}\)
  • \((\lambda \mu)\mathbf{A} = \lambda(\mu \mathbf{A})\)
  • \(1\cdot \mathbf{A}=\mathbf{A}\)
Skills to practice
  • Adding, Subtracting and Multiplying by a Scalar
II.3 Matrix Multiplication
Definition — Matrix Multiplication
Let \(\mathbf{A}\) be a matrix of size \(n\times p\) and \(\mathbf{B}\) be a matrix of size \(p\times q\).
The matrix product \(\mathbf{A}\times \mathbf{B}\) is a matrix \(\mathbf{C}\) of size \(n\times q\) where the entry \(c_{ij}\) is the dot product of the \(i\)-th row of \(\mathbf{A}\) and the \(j\)-th column of \(\mathbf{B}\): $$ c_{ij}=\sum_{k=1}^p a_{ik}b_{kj}, \qquad 1 \leq i \leq n,\; 1 \leq j \leq q. $$
Figure
The product is defined only if the number of columns in \(\mathbf{A}\) is equal to the number of rows in \(\mathbf{B}\). We often omit the symbol \(\times\) and write \(\mathbf{A}\mathbf{B}\) for \(\mathbf{A}\times \mathbf{B}\).
Example
\(\begin{aligned}[t] \begin{pmatrix}\color{orange}2 &\color{orange}3 \\\color{colordef}1 &\color{colordef}0 \\\end{pmatrix} \begin{pmatrix}\color{colorprop}1 & \color{olive}2 \\\color{colorprop}3 &\color{olive}4 \\\end{pmatrix} &=\begin{pmatrix} \color{orange}2\color{black}\times \color{colorprop} 1\color{black}+\color{orange}3\color{black}\times \color{colorprop} 3 \color{black}& \color{orange}2\color{black}\times \color{olive}2\color{black}+\color{orange}3\color{black}\times \color{olive}4 \color{black} \\ \color{colordef}1\color{black}\times \color{colorprop} 1\color{black}+\color{colordef}0\color{black}\times \color{colorprop} 3 \color{black}& \color{colordef}1\color{black}\times \color{olive}2\color{black}+\color{colordef}0\color{black}\times \color{olive}4 \color{black} \end{pmatrix}\\ &=\begin{pmatrix}11 &16\\1 &2\\\end{pmatrix} \end{aligned}\)
In general, matrix multiplication is not commutative (\(\mathbf{A}\mathbf{B} \neq \mathbf{B}\mathbf{A}\)). For example, if \(\mathbf{A}=\begin{pmatrix}0&1\\0&0\\\end{pmatrix}\) and \(\mathbf{B}=\begin{pmatrix}1&0\\0&0\\\end{pmatrix}\), then \(\mathbf{A}\times \mathbf{B}=\begin{pmatrix}0&0\\0&0\\\end{pmatrix}\) while \(\mathbf{B}\times \mathbf{A} = \begin{pmatrix}0&1\\0&0\\\end{pmatrix}\).
Furthermore, the product of two non-zero matrices can be the zero matrix. For example, $$ \begin{pmatrix}0&1\\ 0&0\\ \end{pmatrix}\times \begin{pmatrix}1&0\\ 0&0\\ \end{pmatrix} = \begin{pmatrix}0&0\\ 0&0\\ \end{pmatrix}. $$
Report an error
Proposition — Properties of Matrix Multiplication
Assume all the following products are defined (sizes are compatible).
  1. Associativity: $$ (\mathbf{A}\mathbf{B})\mathbf{C} = \mathbf{A}(\mathbf{B}\mathbf{C})$$
  2. Distributivity over addition: $$ ( \mathbf{A} + \mathbf{B}) \mathbf{C} = \mathbf{A}\mathbf{C} + \mathbf{B}\mathbf{C} \quad\text{ and }\quad \mathbf{A}(\mathbf{B}+ \mathbf{C}) = \mathbf{A}\mathbf{B} + \mathbf{A}\mathbf{C} $$
  3. Identity Element: The identity matrix is the neutral element for multiplication. For any matrix \(\mathbf{A}\) of size \(n \times p\), we have: $$\mathbf{I_n} \mathbf{A} =\mathbf{A} \mathbf{I_p} = \mathbf{A}$$
Definition — Power of a Matrix
Let \(\mathbf{A}\) be a square matrix and \(n\) an integer with \(n \geq 1\). The \(n\)-th power of \(\mathbf{A}\) is the product of \(n\) copies of \(\mathbf{A}\): $$\mathbf{A}^n = \underbrace{\mathbf{A}\times\mathbf{A}\times\dots\times\mathbf{A}}_{n \text{ factors}}.$$ In particular \(\mathbf{A}^1 = \mathbf{A}\) and \(\mathbf{A}^{n+1} = \mathbf{A}^n\times\mathbf{A}\); by convention \(\mathbf{A}^0 = \mathbf{I}\), the identity matrix. As for numbers, all the factors being equal to \(\mathbf{A}\), \(\mathbf{A}^{m+n} = \mathbf{A}^m\mathbf{A}^n\) and \((\mathbf{A}^m)^n = \mathbf{A}^{mn}\).
Example
Let \(\mathbf{A} = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}\). Compute \(\mathbf{A}^2\) and \(\mathbf{A}^3\).

Applying the definition, \(\mathbf{A}^2 = \mathbf{A}\times\mathbf{A}\), then \(\mathbf{A}^3 = \mathbf{A}^2\times\mathbf{A}\): $$\mathbf{A}^2 = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix},$$ $$\mathbf{A}^3 = \mathbf{A}^2\mathbf{A} = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 3 & 2 \\ 2 & 1 \end{pmatrix}.$$

Skills to practice
  • Deciding whether a Sum or a Product is Defined
  • Calculating Matrix Products
  • Investigating Commutativity and Expanding
III Invertible Matrices
III.1 Terminology and Definition
We know how to solve an equation \(ax = b\) with real coefficients. If \(a\neq 0\), the unique solution is \(x=a^{-1}b\). Solving it therefore relies on the existence of the inverse of \(a\). For matrices, solving an equation of the form \(\mathbf{A}\mathbf{x} = \mathbf{B}\) raises the same question about the existence of the inverse of \(\mathbf{A}\).
Report an error
Definition — Inverse of a Matrix
Let \(\mathbf{A}\) be a square matrix of order \(n\).
We say that \(\mathbf{A}\) is invertible if there exists a square matrix \(\mathbf{B}\) of order \(n\) such that $$\mathbf{A}\mathbf{B}=\mathbf{B}\mathbf{A}=\mathbf{I_n}.$$ If it exists, the matrix \(\mathbf{B}\) is called the inverse of \(\mathbf{A}\), denoted \(\mathbf{A}^{-1}\).
An invertible matrix is also called a non-singular matrix. A square matrix that is not invertible is called a singular matrix.
Proposition — Uniqueness of the Inverse
If \(\mathbf{A}\) is invertible, then its inverse is unique.

Suppose that \(\mathbf{B}\) and \(\mathbf{C}\) are both inverses of \(\mathbf{A}\), so that \(\mathbf{A}\mathbf{B} = \mathbf{B}\mathbf{A} = \mathbf{I_n}\) and \(\mathbf{A}\mathbf{C} = \mathbf{C}\mathbf{A} = \mathbf{I_n}\). Then $$ \begin{aligned} \mathbf{C} &= \mathbf{C}\,\mathbf{I_n} &&\scriptstyle(\text{identity matrix})\\ &= \mathbf{C}(\mathbf{A}\mathbf{B}) &&\scriptstyle(\mathbf{A}\mathbf{B} = \mathbf{I_n})\\ &= (\mathbf{C}\mathbf{A})\mathbf{B} &&\scriptstyle(\text{associativity})\\ &= \mathbf{I_n}\,\mathbf{B} &&\scriptstyle(\mathbf{C}\mathbf{A} = \mathbf{I_n})\\ &= \mathbf{B}. \end{aligned} $$ Hence any two inverses of \(\mathbf{A}\) are equal.

Example
Let \(\mathbf{A} = \begin{pmatrix} 2 & 3 \\ 5 & 8 \end{pmatrix}\).
  1. A matrix \(\mathbf{B} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\) such that \(\mathbf{A}\mathbf{B} = \mathbf{I_2}\) is sought. Show that \(a\) and \(c\) satisfy the system \(\begin{cases} 2a + 3c = 1 \\ 5a + 8c = 0 \end{cases}\) and write the system satisfied by \(b\) and \(d\).
  2. Solve the two systems and write \(\mathbf{B}\). Check that \(\mathbf{B}\mathbf{A} = \mathbf{I_2}\) as well, and conclude.
  3. Let \(\mathbf{X} = \begin{pmatrix} x \\ y \end{pmatrix}\) be a column matrix such that \(\mathbf{A}\mathbf{X} = \begin{pmatrix} 9 \\ 23 \end{pmatrix}\). Multiply both sides on the left by \(\mathbf{B}\); deduce \(\mathbf{X}\), then check the result.
  4. Let \(\mathbf{A'} = \begin{pmatrix} 2 & 3 \\ 4 & 6 \end{pmatrix}\). Show that no matrix \(\mathbf{B'}\) satisfies \(\mathbf{A'}\mathbf{B'} = \mathbf{I_2}\).

  1. \(\mathbf{A}\mathbf{B} = \begin{pmatrix} 2a + 3c & 2b + 3d \\ 5a + 8c & 5b + 8d \end{pmatrix}\), and \(\mathbf{I_2} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\). Two matrices are equal when their entries at the same positions are equal, so \(\mathbf{A}\mathbf{B} = \mathbf{I_2}\) means: first column, \(2a + 3c = 1\) and \(5a + 8c = 0\); second column, \(\begin{cases} 2b + 3d = 0 \\ 5b + 8d = 1. \end{cases}\)
  2. First system: \(5 \times (2a + 3c) - 2 \times (5a + 8c) = 5 - 0\) gives \(15c - 16c = 5\), so \(c = -5\), then \(2a = 1 - 3c = 16\) and \(a = 8\). Second system: \(5 \times (2b + 3d) - 2 \times (5b + 8d) = 0 - 2\) gives \(-d = -2\), so \(d = 2\), then \(2b = -3d = -6\) and \(b = -3\). Hence \(\mathbf{B} = \begin{pmatrix} 8 & -3 \\ -5 & 2 \end{pmatrix}\), and $$\mathbf{B}\mathbf{A} = \begin{pmatrix} 8 \times 2 - 3 \times 5 & 8 \times 3 - 3 \times 8 \\ -5 \times 2 + 2 \times 5 & -5 \times 3 + 2 \times 8 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = \mathbf{I_2}.$$ By definition, \(\mathbf{A}\) is invertible and \(\mathbf{A}^{-1} = \mathbf{B}\).
  3. Multiplying both sides of \(\mathbf{A}\mathbf{X} = \begin{pmatrix} 9 \\ 23 \end{pmatrix}\) on the left by \(\mathbf{B}\): $$\mathbf{B}(\mathbf{A}\mathbf{X}) = (\mathbf{B}\mathbf{A})\mathbf{X} = \mathbf{I_2}\mathbf{X} = \mathbf{X}, \qquad\text{so}\qquad \mathbf{X} = \mathbf{B}\begin{pmatrix} 9 \\ 23 \end{pmatrix} = \begin{pmatrix} 8 \times 9 - 3 \times 23 \\ -5 \times 9 + 2 \times 23 \end{pmatrix} = \begin{pmatrix} 3 \\ 1 \end{pmatrix}.$$ Check: \(2 \times 3 + 3 \times 1 = 9\) and \(5 \times 3 + 8 \times 1 = 23\). The inverse plays for \(\mathbf{A}\) the role that \(2^{-1}\) plays for \(2\) in the equation \(2x = 5\).
  4. If \(\mathbf{A'}\mathbf{B'} = \mathbf{I_2}\) with \(\mathbf{B'} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\), the first column gives \(2a + 3c = 1\) and \(4a + 6c = 0\). But \(4a + 6c = 2(2a + 3c) = 2\), not \(0\): the system has no solution, and no matrix \(\mathbf{B'}\) exists. Like the number \(0\), which has no inverse, some non-zero matrices cannot be inverted: an equation \(\mathbf{A'}\mathbf{X} = \mathbf{Y}\) cannot be solved with an inverse of \(\mathbf{A'}\) (it may still have solutions, or none, depending on \(\mathbf{Y}\), but not a unique one obtained by this multiplication).

Skills to practice
  • Verifying an Inverse
III.2 Finding the Inverse of a 2x2 Matrix
Definition — Determinant of a 2x2 Matrix
Let \(\mathbf{A} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\) be a square matrix of order \(2\).
The determinant of \(\mathbf{A}\) is \(ad-bc\). It is denoted \(\det(\mathbf{A})\).
Example
Calculate the determinant of the matrix \(\mathbf{A} = \begin{pmatrix} 5 & 2 \\ 3 & 4 \end{pmatrix}\).

For the matrix \(\mathbf{A} = \begin{pmatrix} 5 & 2 \\ 3 & 4 \end{pmatrix}\), we have \(a=5\), \(b=2\), \(c=3\), and \(d=4\). $$ \begin{aligned} \det(\mathbf{A}) &= ad-bc\\ &=(5)(4) - (2)(3) \\ &= 20 - 6 \\ &= 14 \end{aligned} $$

Proposition — Properties of the Determinant
For all \(2\times 2\) matrices \(\mathbf{A}\) and \(\mathbf{B}\) and every real number \(k\):
  • \(\det(k\mathbf{A}) = k^2 \det(\mathbf{A})\);
  • \(\det(\mathbf{A}\mathbf{B}) = \det(\mathbf{A}) \times \det(\mathbf{B})\).
In particular, combined with the next proposition, a product of two invertible matrices is invertible.
Example
Let \(\mathbf{A} = \begin{pmatrix} 2 & 1 \\ 3 & 4 \end{pmatrix}\) and \(\mathbf{B} = \begin{pmatrix} 1 & 2 \\ 0 & 3 \end{pmatrix}\). Verify both properties of the determinant on \(2\mathbf{A}\) and on \(\mathbf{A}\mathbf{B}\).

First, \(\det(\mathbf{A}) = 2\times 4 - 1\times 3 = 5\) and \(\det(\mathbf{B}) = 1\times 3 - 2\times 0 = 3\).
  • \(2\mathbf{A} = \begin{pmatrix} 4 & 2 \\ 6 & 8 \end{pmatrix}\), so $$\det(2\mathbf{A}) = 4\times 8 - 2\times 6 = 20 = 2^2 \times 5 = 2^2\det(\mathbf{A}).$$
  • \(\mathbf{A}\mathbf{B} = \begin{pmatrix} 2\times 1 + 1\times 0 & 2\times 2 + 1\times 3 \\ 3\times 1 + 4\times 0 & 3\times 2 + 4\times 3 \end{pmatrix} = \begin{pmatrix} 2 & 7 \\ 3 & 18 \end{pmatrix}\), so $$\det(\mathbf{A}\mathbf{B}) = 2\times 18 - 7\times 3 = 15 = 5 \times 3 = \det(\mathbf{A})\det(\mathbf{B}).$$

Proposition — Invertibility of a 2x2 Matrix
Let \(\mathbf{A} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\) be a square matrix of order \(2\).
\(\mathbf{A}\) is invertible if and only if \(\det(\mathbf{A})\neq 0\).
In that case, $$ \mathbf{A}^{-1}=\dfrac{1}{\det(\mathbf{A})}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}. $$
Skills to practice
  • Calculating the Inverse of a 2x2 Matrix
  • Finding the Condition for Invertibility
III.3 Matrices with Technology
By hand, the inverse of a \(2 \times 2\) matrix is found with its determinant. For a matrix of order \(3\) or more, and for any calculation with many or decimal entries, the sums, products, powers, determinants and inverses are computed with technology. The rules do not change: a product is defined only for compatible sizes, and a square matrix has an inverse exactly when its determinant is not zero.
Report an error
Method — Matrix Calculations with Technology
The matrix editor of a graphing calculator stores matrices under names (\(\mathbf{A}\), \(\mathbf{B}\), …); the main screen then calculates with these names.
  1. Enter each matrix: choose its name, give its size (number of rows \(\times\) number of columns), then type the entries row by row, each with its sign.
  2. Write the calculation on the main screen with the stored names: \(\mathbf{A} + \mathbf{B}\), \(\mathbf{A} - \mathbf{B}\), \(k\mathbf{A}\), \(\mathbf{A}\mathbf{B}\), \(\mathbf{A}^n\), \(\det(\mathbf{A})\) (in the matrix menu) and \(\mathbf{A}^{-1}\) (with the key \(x^{-1}\)).
  3. Read the result entry by entry. When an exact answer is asked, convert the decimal entries into fractions with the fraction command, then check them exactly (step 5); round only the final answers.
  4. Interpret an error message. A dimension error means that the operation is not defined for these sizes, for instance \(\mathbf{A}\mathbf{B}\) when the number of columns of \(\mathbf{A}\) differs from the number of rows of \(\mathbf{B}\). A singular matrix error means that the square matrix has no inverse.
  5. Check a result that matters: one entry of a product, row by column; for an inverse given with exact fractions, the product \(\mathbf{A}\mathbf{A}^{-1}\) with these fractions must be exactly \(\mathbf{I}\) (at least one row checked by hand).
The calculator also gives the determinant of a square matrix of order \(3\) or more. It plays the same role as for order \(2\) (admitted here): the matrix is invertible if and only if its determinant is not zero. The mock-up enters \(\mathbf{A} = \begin{pmatrix} 2 & 1 & 1 \\ 1 & 3 & 2 \\ 1 & 0 & 0 \end{pmatrix}\), then computes \(\det(\mathbf{A}) = -1 \neq 0\) and the inverse, whose entries here are whole numbers.
Figure
Example
Let \(\mathbf{A} = \begin{pmatrix} 3 & 1 & 2 \\ 1 & 2 & 1 \\ 2 & 1 & 3 \end{pmatrix}\) and \(\mathbf{M} = \begin{pmatrix} 2 & 0 & 1 \\ 1 & 3 & 2 \\ 1 & 1 & 1 \end{pmatrix}\). Use technology to answer.
  1. Find \(\det(\mathbf{A})\) and \(\mathbf{A}^{-1}\), with exact entries.
  2. Check by hand the entry in row \(1\) and column \(1\) of the product \(\mathbf{A}\mathbf{A}^{-1}\).
  3. For \(\mathbf{M}^{-1}\), the calculator reports a singular matrix error. Find \(\det(\mathbf{M})\). Then check that the second row of \(\mathbf{M}\) is \(3\) times its third row minus its first row, and explain why a system \(\mathbf{M}\mathbf{X} = \mathbf{B}\) cannot have a unique solution.

  1. With \(\mathbf{A}\) entered in the matrix editor, the calculator gives \(\det(\mathbf{A}) = 8 \neq 0\): \(\mathbf{A}\) is invertible. It displays \(\mathbf{A}^{-1}\) with the decimal entries \(0.625\), \(-0.125\), \(-0.375\), …, which the fraction command converts: $$\mathbf{A}^{-1} = \begin{pmatrix} \frac{5}{8} & -\frac{1}{8} & -\frac{3}{8} \\ -\frac{1}{8} & \frac{5}{8} & -\frac{1}{8} \\ -\frac{3}{8} & -\frac{1}{8} & \frac{5}{8} \end{pmatrix} = \frac{1}{8}\begin{pmatrix} 5 & -1 & -3 \\ -1 & 5 & -1 \\ -3 & -1 & 5 \end{pmatrix}.$$
  2. The entry in row \(1\) and column \(1\) of \(\mathbf{A}\mathbf{A}^{-1}\) is the first row of \(\mathbf{A}\) multiplied by the first column of \(\mathbf{A}^{-1}\): $$\begin{aligned}[t] 3 \times \frac{5}{8} + 1 \times \left(-\frac{1}{8}\right) + 2 \times \left(-\frac{3}{8}\right) &= \frac{15 - 1 - 6}{8} \\ &= 1, \end{aligned}$$ which is the entry of \(\mathbf{I_3}\) in row \(1\) and column \(1\).
  3. The calculator gives \(\det(\mathbf{M}) = 0\): \(\mathbf{M}\) has no inverse, as the error message said. Moreover $$3\begin{pmatrix} 1 & 1 & 1 \end{pmatrix} - \begin{pmatrix} 2 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 3 - 2 & 3 - 0 & 3 - 1 \end{pmatrix} = \begin{pmatrix} 1 & 3 & 2 \end{pmatrix},$$ the second row of \(\mathbf{M}\). In a system \(\mathbf{M}\mathbf{X} = \mathbf{B}\), the left-hand side of the second equation is therefore \(3\) times that of the third minus that of the first: this equation brings no new information on the unknowns (or contradicts the two others), so the system cannot have a unique solution, and the method \(\mathbf{X} = \mathbf{M}^{-1}\mathbf{B}\) does not apply.

Skills to practice
  • Calculating Determinants with Technology
  • Finding Inverses with Technology
  • Using Technology with Matrices
IV Applications
IV.1 Modelling a Situation with Matrices
A matrix stores a table of numbers, and the operations on matrices answer questions about the data of the table. Throughout this sub-section, three markets, \(M_1\), \(M_2\) and \(M_3\), sell apples, pears, bananas and oranges, and three customers, Alice, Bilal and Chloé, place orders. The prices, in euros per kilogram, and the orders, in kilograms, are the following.
Price per kilogram Apples Pears Bananas Oranges
Market \(M_1\) 2.40 3.10 1.90 2.60
Market \(M_2\) 2.20 3.50 2.10 2.40
Market \(M_3\) 2.50 2.90 1.80 2.80
  
Order in kilograms Alice Bilal Chloé
Apples 3 2 0
Pears 1 2 4
Bananas 2 0 5
Oranges 4 3 1
Report an error
Example
  1. Write the price matrix \(\mathbf{P}\), with one row per market and one column per fruit, and the order matrix \(\mathbf{C}\), with one row per fruit and one column per customer. Give the size of each matrix and the meaning of the entries \(p_{23}\) and \(c_{42}\).
  2. The prices can also be arranged with one row per fruit and one column per market. Write this matrix. Is it equal to \(\mathbf{P}\)?

  1. $$\mathbf{P} = \begin{pmatrix} 2.40 & 3.10 & 1.90 & 2.60 \\ 2.20 & 3.50 & 2.10 & 2.40 \\ 2.50 & 2.90 & 1.80 & 2.80 \end{pmatrix} \qquad\text{and}\qquad \mathbf{C} = \begin{pmatrix} 3 & 2 & 0 \\ 1 & 2 & 4 \\ 2 & 0 & 5 \\ 4 & 3 & 1 \end{pmatrix}.$$ \(\mathbf{P}\) has size \(3 \times 4\) (three markets, four fruits) and \(\mathbf{C}\) has size \(4 \times 3\) (four fruits, three customers). The entry \(p_{23} = 2.10\) is the price, in euros, of a kilogram of bananas at market \(M_2\); the entry \(c_{42} = 3\) is the number of kilograms of oranges ordered by Bilal.
  2. With one row per fruit and one column per market, the matrix is \(\begin{pmatrix} 2.40 & 2.20 & 2.50 \\ 3.10 & 3.50 & 2.90 \\ 1.90 & 2.10 & 1.80 \\ 2.60 & 2.40 & 2.80 \end{pmatrix}\), of size \(4 \times 3\). It contains the same numbers as \(\mathbf{P}\), but it is not equal to \(\mathbf{P}\): two matrices are equal only when they have the same size and the same entries at the same positions. Its rows are the columns of \(\mathbf{P}\), and the convention chosen (markets in rows) must be fixed before any computation.

Example
The prices and the orders are the matrices \(\mathbf{P}\) (one row per market, one column per fruit) and \(\mathbf{C}\) (one row per fruit, one column per customer): $$\mathbf{P} = \begin{pmatrix} 2.40 & 3.10 & 1.90 & 2.60 \\ 2.20 & 3.50 & 2.10 & 2.40 \\ 2.50 & 2.90 & 1.80 & 2.80 \end{pmatrix}, \qquad \mathbf{C} = \begin{pmatrix} 3 & 2 & 0 \\ 1 & 2 & 4 \\ 2 & 0 & 5 \\ 4 & 3 & 1 \end{pmatrix}.$$
  1. The following week, the three customers place a second order, \(\mathbf{A} = \begin{pmatrix} 1 & 0 & 2 \\ 2 & 1 & 0 \\ 0 & 3 & 1 \\ 2 & 2 & 0 \end{pmatrix}\) (same rows and columns as \(\mathbf{C}\)). Compute the matrix \(\mathbf{T}\) of the total quantities ordered by each customer over the two weeks.
  2. All the prices rise by \(10\pourcent\). Compute the new price matrix \(\mathbf{P'}\).
  3. Can the matrices \(\mathbf{P}\) and \(\mathbf{C}\) be added? Why?

  1. Each customer's total quantity of each fruit is the sum of the two weekly quantities, so \(\mathbf{T}\) is the sum of the two matrices, entry by entry: $$\mathbf{T} = \mathbf{C} + \mathbf{A} = \begin{pmatrix} 3 + 1 & 2 + 0 & 0 + 2 \\ 1 + 2 & 2 + 1 & 4 + 0 \\ 2 + 0 & 0 + 3 & 5 + 1 \\ 4 + 2 & 3 + 2 & 1 + 0 \end{pmatrix} = \begin{pmatrix} 4 & 2 & 2 \\ 3 & 3 & 4 \\ 2 & 3 & 6 \\ 6 & 5 & 1 \end{pmatrix}.$$
  2. A rise of \(10\pourcent\) multiplies every price by \(1.1\): the new price matrix is the product of \(\mathbf{P}\) by the real number \(1.1\), $$\mathbf{P'} = 1.1\,\mathbf{P} = \begin{pmatrix} 2.64 & 3.41 & 2.09 & 2.86 \\ 2.42 & 3.85 & 2.31 & 2.64 \\ 2.75 & 3.19 & 1.98 & 3.08 \end{pmatrix}.$$
  3. No. \(\mathbf{P}\) has size \(3 \times 4\) and \(\mathbf{C}\) has size \(4 \times 3\): the sum of two matrices is only defined for two matrices of the same size, and the entries would not even have the same meaning (a price and a quantity).

Example
The prices and the orders are the matrices \(\mathbf{P}\) (one row per market, one column per fruit) and \(\mathbf{C}\) (one row per fruit, one column per customer): $$\mathbf{P} = \begin{pmatrix} 2.40 & 3.10 & 1.90 & 2.60 \\ 2.20 & 3.50 & 2.10 & 2.40 \\ 2.50 & 2.90 & 1.80 & 2.80 \end{pmatrix}, \qquad \mathbf{C} = \begin{pmatrix} 3 & 2 & 0 \\ 1 & 2 & 4 \\ 2 & 0 & 5 \\ 4 & 3 & 1 \end{pmatrix}.$$
  1. Explain why the cost of the order of customer \(j\) at market \(i\) is the entry \((i,j)\) of the product \(\mathbf{P}\mathbf{C}\), then compute \(\mathbf{P}\mathbf{C}\).
  2. Each customer buys their whole order at a single market. At which market should each customer buy?
  3. Is the product \(\mathbf{C}\mathbf{P}\) defined? What do its entries represent?

  1. The cost of the order of customer \(j\) at market \(i\) is the sum, over the four fruits, of the price of the fruit at market \(i\) multiplied by the quantity ordered by customer \(j\): the entries of row \(i\) of \(\mathbf{P}\) multiplied by the entries of column \(j\) of \(\mathbf{C}\), then added. This is exactly the entry \((i,j)\) of \(\mathbf{P}\mathbf{C}\), which is defined since \(\mathbf{P}\) has \(4\) columns and \(\mathbf{C}\) has \(4\) rows. For instance, at row \(1\) and column \(1\), $$2.40 \times 3 + 3.10 \times 1 + 1.90 \times 2 + 2.60 \times 4 = 24.50,$$ and the whole product, with one row per market and one column per customer, is $$\mathbf{P}\mathbf{C} = \begin{pmatrix} 24.50 & 18.80 & 24.50 \\ 23.90 & 18.60 & 26.90 \\ 25.20 & 19.20 & 23.40 \end{pmatrix}.$$
  2. Each customer reads their column and chooses the smallest cost: Alice pays \(\Euro 23.90\) at \(M_2\) (against \(\Euro 24.50\) at \(M_1\) and \(\Euro 25.20\) at \(M_3\)), Bilal pays \(\Euro 18.60\) at \(M_2\), and Chloé pays \(\Euro 23.40\) at \(M_3\). The cheapest market depends on the customer.
  3. \(\mathbf{C}\mathbf{P}\) is defined too, since \(\mathbf{C}\) has \(3\) columns and \(\mathbf{P}\) has \(3\) rows; it is a \(4 \times 4\) matrix. Its entry \((i,j)\) is \(c_{i1}p_{1j} + c_{i2}p_{2j} + c_{i3}p_{3j}\): the quantity of fruit \(i\) ordered by the first customer times the price of fruit \(j\) at the first market, plus the same for the second customer and the second market, plus the same for the third. Each term pairs the \(k\)-th customer with the \(k\)-th market, which have nothing to do with each other: the sum does not answer the question of the cost of an order at a market, and represents nothing in this situation. The order of the factors carries the meaning of the product.

Example
A stationery chain has three branches, \(B_1\), \(B_2\) and \(B_3\). In one week, they sold the quantities of the matrix \(\mathbf{Q}\), with one row per branch and one column per product (notebooks, pens, folders, calculators). The selling prices and the unit costs, in dollars, are the column matrices \(\mathbf{p}\) and \(\mathbf{c}\) (one row per product): $$\mathbf{Q} = \begin{pmatrix} 120 & 340 & 85 & 22 \\ 95 & 410 & 60 & 31 \\ 150 & 280 & 110 & 18 \end{pmatrix}, \qquad \mathbf{p} = \begin{pmatrix} 2.50 \\ 1.20 \\ 3.80 \\ 14.90 \end{pmatrix}, \qquad \mathbf{c} = \begin{pmatrix} 1.60 \\ 0.70 \\ 2.30 \\ 9.40 \end{pmatrix}.$$ Use technology to answer.
  1. Compute \(\mathbf{R} = \mathbf{Q}\mathbf{p}\) and interpret its entries.
  2. Compute the matrix of the profits of the week, branch by branch, and the total profit of the chain.
  3. The following week, every selling price rises by \(10\pourcent\) and the quantities sold do not change. Give the new matrix of revenues without entering new prices.

  1. \(\mathbf{Q}\) has size \(3 \times 4\) and \(\mathbf{p}\) has size \(4 \times 1\): the product is defined and has size \(3 \times 1\). The calculator gives $$\mathbf{R} = \mathbf{Q}\mathbf{p} = \begin{pmatrix} 1{,}358.80 \\ 1{,}419.40 \\ 1{,}397.20 \end{pmatrix}.$$ Row \(i\) of \(\mathbf{Q}\) times \(\mathbf{p}\) adds up, over the four products, the quantity sold by branch \(B_i\) times the price: the entry in row \(i\) is the revenue of branch \(B_i\), in dollars. Check of the first entry: \(120 \times 2.50 + 340 \times 1.20 + 85 \times 3.80 + 22 \times 14.90 = 300 + 408 + 323 + 327.80 = 1{,}358.80\).
  2. The profit on one item is its price minus its cost, so the profits of the branches are the entries of \(\mathbf{Q}(\mathbf{p} - \mathbf{c})\): $$\mathbf{Q}(\mathbf{p} - \mathbf{c}) = \mathbf{Q}\begin{pmatrix} 0.90 \\ 0.50 \\ 1.50 \\ 5.50 \end{pmatrix} = \begin{pmatrix} 526.50 \\ 551.00 \\ 539.00 \end{pmatrix}.$$ The total profit of the chain is the sum of these entries, the product by the row matrix \(\begin{pmatrix} 1 & 1 & 1 \end{pmatrix}\): \(526.50 + 551.00 + 539.00 = \dollar 1{,}616.50\).
  3. The new prices are \(1.1\,\mathbf{p}\). Each entry of \(\mathbf{Q}(1.1\,\mathbf{p})\) is a sum of products in which every price is multiplied by \(1.1\), so it is \(1.1\) times the corresponding entry of \(\mathbf{Q}\mathbf{p}\): $$\mathbf{Q}(1.1\,\mathbf{p}) = 1.1\,\mathbf{R} = \begin{pmatrix} 1{,}494.68 \\ 1{,}561.34 \\ 1{,}536.92 \end{pmatrix}.$$

Skills to practice
  • Modelling Tables of Data with Matrices
IV.2 Solving Systems with the Equation Solver
Recappreviously studied — click to reread
Method — Solving a Linear System with the Equation Solver
The linear system solver, in the equation menu of a graphing calculator, solves a system of two linear equations in two unknowns, or of three linear equations in three unknowns.
  1. Write each equation in the form \(ax + by = c\) (two unknowns) or \(ax + by + cz = d\) (three unknowns): the unknowns on the left, in the same order in every equation, and the constant on the right.
  2. Open the linear system solver and choose the number of unknowns.
  3. Enter the coefficients row by row, one row per equation, each with its sign, and \(0\) for a missing unknown.
  4. Solve and read the value of each unknown. If the solver reports no solution, or infinitely many, the system has no unique solution.
  5. Check the solution by substituting it in each original equation, then report each value exactly when the checks hold exactly, otherwise to 3 significant figures.
The mock-up solves \(\begin{cases} 2x + y - z = 1 \\ x - y + 2z = 7 \\ 3x + 2y + z = 10 \end{cases}\): the solution is \(x = 1.6\), \(y = 1\) and \(z = 3.2\). Check: \(2 \times 1.6 + 1 - 3.2 = 1\), \(1.6 - 1 + 2 \times 3.2 = 7\) and \(3 \times 1.6 + 2 \times 1 + 3.2 = 10\), exactly, so these values are exact.
Figure
Skills to practice
  • Solving Systems with the Equation Solver
IV.3 Solving Systems of Linear Equations
The sum of the heights of a son and his father is \(2.5\) meters. The father is \(0.5\) meters taller than his son. What are their heights?
The first step is to model this situation with a system of linear equations.
Let the variable \(x\) represent the son's height and the variable \(y\) represent the father's height.
The pair \((x,y)\) satisfies the following system: $$(S)\quad \begin{cases}x+y&=2.5\\ -x+y&=0.5\end{cases}$$ We can solve a single linear equation with real coefficients, such as \(2x=4\), by multiplying by the inverse of \(2\) to obtain \(x=2\).
A key idea is to transform a system of two equations in two unknowns into a single equation in one (vector) unknown. This transformation involves an abstraction of the coefficients and variables: we move from real numbers to arrays of numbers (matrices).
The equivalent matrix equation is $$\mathbf{A}\mathbf{x} =\mathbf{B}$$ with \(\mathbf{A}=\begin{pmatrix} 1 & 1 \\ -1 & 1 \\\end{pmatrix}\), \(\mathbf{x}=\begin{pmatrix} x \\ y \\\end{pmatrix}\) and \(\mathbf{B}=\begin{pmatrix} 2.5 \\ 0.5 \\\end{pmatrix}\).
The matrix \(\mathbf{A}\) is invertible. This means that there exists a matrix \(\mathbf{A}^{-1}=\begin{pmatrix} \frac 1 2 & -\frac 1 2 \\ \frac 1 2 & \frac 1 2 \\\end{pmatrix}\) such that, by multiplying both sides of the equation \(\mathbf{A}\mathbf{x} =\mathbf{B}\) on the left by \(\mathbf{A}^{-1}\), we get: $$ \mathbf{x}=\mathbf{A}^{-1} \mathbf{B}.$$ Thus, $$ \begin{pmatrix} x \\ y \\ \end{pmatrix} = \begin{pmatrix} \frac 1 2 & -\frac 1 2 \\ \frac 1 2 & \frac 1 2 \\ \end{pmatrix} \begin{pmatrix} 2.5 \\ 0.5 \\ \end{pmatrix} = \begin{pmatrix} 1 \\ 1.5 \\ \end{pmatrix}. $$ By identification, the unique solution is \(x=1\) and \(y=1.5\).
Report an error
Proposition — Matrix Representation
A linear system of the form $$ \begin{cases} a_{11}x_1 + a_{12}x_2 + \dots + a_{1n}x_n = b_1 \\ a_{21}x_1 + a_{22}x_2 + \dots + a_{2n}x_n = b_2 \\ \quad\quad\quad\quad\quad\vdots \\ a_{n1}x_1 + a_{n2}x_2 + \dots + a_{nn}x_n = b_n \end{cases} $$ is equivalent to the equation \(\mathbf{A}\mathbf{x} = \mathbf{B}\) where $$ \mathbf{A} = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n}\\ \vdots & \vdots & & \vdots\\ a_{n1} & a_{n2} & \cdots & a_{nn}\\ \end{pmatrix} $$ is a square matrix of order \(n\), and $$ \mathbf{x} = \begin{pmatrix}x_{1}\\ \vdots \\ x_{n}\\ \end{pmatrix}, \quad \mathbf{B} = \begin{pmatrix}b_{1}\\ \vdots \\ b_{n}\\ \end{pmatrix} $$ are column matrices (column vectors).
Example
Write the system \(\begin{cases}2x+5y&=2\\x+3y&=5\end{cases}\) in matrix form.

In matrix form, the system is $$ \begin{pmatrix}2 & 5 \\ 1 & 3 \\ \end{pmatrix} \begin{pmatrix} x \\ y \\ \end{pmatrix} = \begin{pmatrix} 2 \\ 5 \\ \end{pmatrix}. $$

Proposition — Solving by the Inverse
If \(\mathbf{A}\) is an invertible matrix of order \(n\) and \(\mathbf{B}\) a column matrix with \(n\) rows, then the equation \(\mathbf{A}\mathbf{x} = \mathbf{B}\), whose unknown \(\mathbf{x}\) is a column matrix with \(n\) rows, has the unique solution \(\mathbf{x} = \mathbf{A}^{-1}\mathbf{B}\).

$$ \begin{aligned} \mathbf{A}\mathbf{x} &= \mathbf{B}\\ \mathbf{A}^{-1}(\mathbf{A}\mathbf{x}) &= \mathbf{A}^{-1}\mathbf{B} && \text{(multiply both sides on the left by } \mathbf{A}^{-1}\text{)}\\ (\mathbf{A}^{-1}\mathbf{A})\mathbf{x} &= \mathbf{A}^{-1}\mathbf{B} && \text{(associativity)} \\ \mathbf{I_n}\mathbf{x} &= \mathbf{A}^{-1}\mathbf{B} && \text{(definition of inverse)} \\ \mathbf{x} &= \mathbf{A}^{-1}\mathbf{B} && \text{(property of the identity matrix)} \end{aligned} $$ Conversely, \(\mathbf{x}=\mathbf{A}^{-1}\mathbf{B}\) is indeed a solution, since \(\mathbf{A}(\mathbf{A}^{-1}\mathbf{B})=(\mathbf{A}\mathbf{A}^{-1})\mathbf{B}=\mathbf{B}\).

Example
Solve the system $$ \begin{pmatrix}2 & 5 \\ 1 & 3 \\ \end{pmatrix} \begin{pmatrix} x \\ y \\ \end{pmatrix} = \begin{pmatrix} 2 \\ 5 \\ \end{pmatrix}. $$

  • Find the inverse: Since \(\det(\mathbf{A}) = (2)(3) - (5)(1) = 6 - 5 = 1 \neq 0\), the matrix \(\mathbf{A}\) is invertible. $$ \mathbf{A}^{-1} = \frac{1}{1} \begin{pmatrix} 3 & -5 \\ -1 & 2 \end{pmatrix} = \begin{pmatrix} 3 & -5 \\ -1 & 2 \end{pmatrix}. $$
  • Find the solution: $$ \begin{aligned} \begin{pmatrix} x \\ y \\ \end{pmatrix} &= \begin{pmatrix} 3 & -5 \\ -1 & 2 \end{pmatrix} \begin{pmatrix} 2 \\ 5 \\ \end{pmatrix}\\ &= \begin{pmatrix} (3)(2)+(-5)(5) \\ (-1)(2)+(2)(5) \\ \end{pmatrix}\\ &= \begin{pmatrix} -19 \\ 8 \\ \end{pmatrix}. \end{aligned} $$ The solution is \(x = -19\) and \(y=8\).

Method — Solving a System with the Inverse Matrix
  1. Write the system in matrix form \(\mathbf{A}\mathbf{X}=\mathbf{B}\).
  2. Compute \(\det(\mathbf{A})\). If \(\det(\mathbf{A}) \neq 0\), then \(\mathbf{X} = \mathbf{A}^{-1}\mathbf{B}\) is the unique solution.
  3. If \(\det(\mathbf{A}) = 0\), the method does not apply: the system has either no solution or infinitely many; it is decided on its equations themselves, by elimination (for two equations in two unknowns, Proposition “Singular Coefficient Matrix”).
Method — Solving a Larger System with Technology
For larger systems (typically \(3\times 3\) and beyond), the inverse is rarely computed by hand.
  1. Enter the coefficient matrix \(\mathbf{A}\) and the column matrix \(\mathbf{B}\) using the calculator's matrix mode.
  2. Compute the product \(\mathbf{A}^{-1}\mathbf{B}\) directly; its entries are the values of the unknowns. (If the calculator reports that \(\mathbf{A}\) has no inverse, the system has no unique solution: see the proposition on the non-invertible case.)
Example
Using technology, solve \(\begin{cases} x + y + z = 2 \\ 2x - y + 3z = 9 \\ -x + 4y + z = -3 \end{cases}\)

With \(\mathbf{A} = \begin{pmatrix} 1 & 1 & 1 \\ 2 & -1 & 3 \\ -1 & 4 & 1 \end{pmatrix}\) and \(\mathbf{B} = \begin{pmatrix} 2 \\ 9 \\ -3 \end{pmatrix}\), technology gives $$\mathbf{X} = \mathbf{A}^{-1}\mathbf{B} = \begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix}.$$ The solution is \((1, -1, 2)\). Check in the first equation: \(1 - 1 + 2 = 2\).

Proposition — Singular Coefficient Matrix
For a system of two linear equations in two unknowns, whose coefficient rows are both non-zero, with matrix form \(\mathbf{A}\mathbf{X}=\mathbf{B}\): if \(\det(\mathbf{A}) = 0\), the two lines are parallel or coincident, and the system has no solution (strictly parallel lines) or infinitely many solutions (coincident lines).
Example
Determine the number of solutions of each system: $$\text{(a)}\ \begin{cases} x + 2y = 3 \\ 2x + 4y = 6 \end{cases} \qquad \text{(b)}\ \begin{cases} x + 2y = 3 \\ 2x + 4y = 7 \end{cases}$$

Both systems share the coefficient matrix \(\mathbf{A} = \begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix}\) with \(\det(\mathbf{A}) = 1\times 4 - 2\times 2 = 0\): neither system has a unique solution, and the lines are parallel or coincident.
  • (a) The second equation is exactly twice the first: the two lines are coincident, and the system has infinitely many solutions.
  • (b) Twice the first equation gives \(2x + 4y = 6 \neq 7\): the two lines are strictly parallel, and the system has no solution.

Skills to practice
  • Solving Systems with Technology
  • Solving Systems with the Inverse Matrix
IV.4 Coding and Decoding Messages
Method — Coding and Decoding with a Matrix
A message is coded with an invertible square matrix \(\mathbf{K}\) of order \(n\), the key, known only to the sender and to the receiver.
  1. Number the letters: \(A = 1\), \(B = 2\), …, \(Z = 26\).
  2. Cut the list of numbers into blocks of \(n\) numbers, each written as a column matrix \(\mathbf{M}\); an incomplete last block is completed with a letter agreed in advance, for instance X, which the receiver removes at the end (the sender can also send the number of letters).
  3. Code each block: \(\mathbf{C} = \mathbf{K}\mathbf{M}\). The coded message is the list of the entries of the coded blocks.
  4. Decode each block with the inverse of the key: \(\mathbf{M} = \mathbf{K}^{-1}\mathbf{C}\), since \(\mathbf{K}^{-1}(\mathbf{K}\mathbf{M}) = (\mathbf{K}^{-1}\mathbf{K})\mathbf{M} = \mathbf{I}\mathbf{M} = \mathbf{M}\).
The key must be invertible, so that each coded block comes from exactly one block, the unique solution \(\mathbf{M} = \mathbf{K}^{-1}\mathbf{C}\) of \(\mathbf{K}\mathbf{M} = \mathbf{C}\). A key of order \(2\) with integer entries and determinant \(1\) or \(-1\) has an inverse with integer entries, and decoding is done by hand; a key of order \(3\) is inverted with technology.
Example
Messages are coded with the key \(\mathbf{K} = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}\), in blocks of two letters.
  1. Code the word MATH.
  2. Decode the received message \(51 \quad 88 \quad 14 \quad 25\).

  1. MATH gives the numbers \(13\), \(1\), \(20\), \(8\), cut into the blocks \(\begin{pmatrix} 13 \\ 1 \end{pmatrix}\) and \(\begin{pmatrix} 20 \\ 8 \end{pmatrix}\). Coding each block: $$\mathbf{K}\begin{pmatrix} 13 \\ 1 \end{pmatrix} = \begin{pmatrix} 3 \times 13 + 1 \times 1 \\ 5 \times 13 + 2 \times 1 \end{pmatrix} = \begin{pmatrix} 40 \\ 67 \end{pmatrix} \quad\text{and}\quad \mathbf{K}\begin{pmatrix} 20 \\ 8 \end{pmatrix} = \begin{pmatrix} 3 \times 20 + 1 \times 8 \\ 5 \times 20 + 2 \times 8 \end{pmatrix} = \begin{pmatrix} 68 \\ 116 \end{pmatrix}.$$ The coded message is \(40 \quad 67 \quad 68 \quad 116\).
  2. \(\det(\mathbf{K}) = 3 \times 2 - 1 \times 5 = 1 \neq 0\), so the key is invertible and, by the Proposition “Invertibility of a 2x2 Matrix”, $$\mathbf{K}^{-1} = \frac{1}{1}\begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix} = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}.$$ The received blocks are \(\begin{pmatrix} 51 \\ 88 \end{pmatrix}\) and \(\begin{pmatrix} 14 \\ 25 \end{pmatrix}\): $$\mathbf{K}^{-1}\begin{pmatrix} 51 \\ 88 \end{pmatrix} = \begin{pmatrix} 2 \times 51 - 88 \\ -5 \times 51 + 3 \times 88 \end{pmatrix} = \begin{pmatrix} 14 \\ 9 \end{pmatrix} \quad\text{and}\quad \mathbf{K}^{-1}\begin{pmatrix} 14 \\ 25 \end{pmatrix} = \begin{pmatrix} 2 \times 14 - 25 \\ -5 \times 14 + 3 \times 25 \end{pmatrix} = \begin{pmatrix} 3 \\ 5 \end{pmatrix}.$$ The numbers \(14\), \(9\), \(3\), \(5\) are the letters N, I, C, E: the message is NICE. Check: \(\mathbf{K}\begin{pmatrix} 14 \\ 9 \end{pmatrix} = \begin{pmatrix} 42 + 9 \\ 70 + 18 \end{pmatrix} = \begin{pmatrix} 51 \\ 88 \end{pmatrix}\).

Skills to practice
  • Coding and Decoding a Block
  • Decoding a Message
V Going further
Skills to practice
  • Solving Problems with Matrices
  • Quiz