\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)

Matrices

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. This chapter introduces the algebraic foundations of matrices, their operations, and their fundamental role in a variety of mathematical and scientific applications. Unless stated otherwise, matrix entries are real numbers.

Structure

Definition

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}\).

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}\)

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}$$

Matrix Operations

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 \(0\) is the identity element for addition: \(\mathbf{A}+0=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.
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}\)

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}\)

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 \leqslant i \leqslant n,\; 1 \leqslant j \leqslant q.$$
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}.$$
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}$$

Invertible Matrices

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}\).
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 unique and 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.
Example
The inverse of the identity matrix is itself, because \(\mathbf{I_n} \mathbf{I_n} =\mathbf{I_n}\).

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 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}.$$

Let \(\mathbf{A} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\).
  • If \(\mathbf{A}\) is invertible, then \(\det(\mathbf{A})\neq 0\).
    Assume that \(\mathbf{A}\) is invertible and let$$\mathbf{A}^{-1} = \begin{pmatrix} w & x \\ y & z \end{pmatrix}.$$The condition \(\mathbf{A}\mathbf{A}^{-1} = \mathbf{I_2}\) gives$$\begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} w & x \\ y & z \end{pmatrix}=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\Rightarrow\begin{pmatrix} aw+by & ax+bz \\ cw+dy & cx+dz \end{pmatrix}=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}.$$By identification, we obtain two systems:$$\begin{cases} aw+by = 1 \quad (1) \\ cw+dy = 0 \quad (2)\end{cases}\quad \text{and} \quad\begin{cases} ax+bz = 0 \quad (3) \\ cx+dz = 1 \quad (4)\end{cases}$$Suppose now that \(ad-bc=0\).
    Multiply (1) by \(d\) and (2) by \(b\), then subtract:$$(ad-bc)w = d.$$Since \(ad-bc=0\), we get \(d=0\).
    Multiply (1) by \(c\) and (2) by \(a\), then subtract:$$(ad-bc)y = a.$$Since \(ad-bc=0\), we get \(a=0\).
    Multiply (3) by \(d\) and (4) by \(b\), then subtract:$$(ad-bc)x = -b.$$Since \(ad-bc=0\), we get \(b=0\).
    Finally, multiply (3) by \(c\) and (4) by \(a\), then subtract:$$(ad-bc)z = a.$$Since \(ad-bc=0\), we get \(c=0\).
    Thus \(a=b=c=d=0\), and equation (1) becomes \(0=1\), which is impossible. Hence \(ad-bc\neq 0\), i.e.\ \(\det(\mathbf{A})\neq 0\).
  • If \(\det(\mathbf{A})\neq 0\), then \(\mathbf{A}\) is invertible.
    Assume now that \(ad-bc\neq 0\). Set$$\mathbf{B}=\dfrac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}.$$A direct computation shows that$$\mathbf{A}\mathbf{B} = \mathbf{B}\mathbf{A} = \mathbf{I_2}.$$Therefore \(\mathbf{B}\) is the inverse of \(\mathbf{A}\) and \(\mathbf{A}\) is invertible.

Applications

Solving Systems of Linear Equations


The sum of the heights of a son and his father is \(2.5\) meters. The difference in their heights is \(0.5\) meters. 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\).

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
If \(\mathbf{A}\) is invertible, then the equation \(\mathbf{A}\mathbf{x} = \mathbf{B}\) 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}$$

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\).