Inverse of a Matrix Using Determinants
Sofia texts Jayden a secret message. She turns each pair of letters into a pair of numbers and multiplies it by a $2\times 2$ matrix $K$. To read the message, Jayden has to undo that multiplication, so he needs $K^{-1}$. Which matrices $K$ can he undo, and how does he find the inverse?
Determinants answer both questions at once. They tell you whether an inverse exists, and they give a formula for it. The formula works for $3\times3$ matrices and for matrices with a parameter in them.
Computing 3×3 determinants
You already know the $2\times 2$ determinant: $\begin{vmatrix} a&b\\c&d\end{vmatrix}=ad-bc$. For a $3\times3$ matrix, the diagonal method is the fastest way. Copy the first two columns to the right of the matrix (to the right of the dashed line). Add the three products along the blue diagonals (down to the right) and subtract the three products along the orange dashed diagonals (up to the right).
$$\begin{vmatrix} a&b&c\\d&e&f\\g&h&i\end{vmatrix}=(aei+bfg+cdh)-(ceg+afh+bdi)$$Some problems call this Sarrus' rule. It works only for $3\times3$ matrices. For larger matrices you expand along a row or column, as the next sections show.
In a small logistics company, the number of pallets of three types of products in three different warehouses is recorded using the following matrix $A$:…
In a small logistics company, the number of pallets of three types of products in three different warehouses is recorded using the following matrix $A$:
$A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 2 & 1 & 1 \end{pmatrix}$
Calculate the determinant of the matrix $A$ using Sarrus' rule to verify the consistency of the inventory data.
Properties that save work
Computing a $4\times4$ determinant straight from the definition is a lot of work. These properties let you simplify first. They hold for rows and for columns, and $A$ is $n\times n$.
| Property | What it says |
|---|---|
| Transpose | $\lvert A^t\rvert=\lvert A\rvert$ |
| Product | $\lvert AB\rvert=\lvert A\rvert\cdot\lvert B\rvert$ |
| Scalar multiple | $\lvert kA\rvert=k^{n}\lvert A\rvert$ (every one of the $n$ rows gets a factor $k$) |
| Swap two rows | the determinant changes sign |
| Multiply one row by $k$ | the determinant is multiplied by $k$ (so you can factor $k$ out of a row) |
| Add a multiple of one row to another | the determinant does not change |
| Zero row, or two equal or proportional rows | the determinant is $0$ |
Given the matrix of order 2: $A = \begin{pmatrix} 3 & -1 \\ 2 & 5 \end{pmatrix}$ Calculate with reasoning, applying the properties of determinants: a) The value of…
Given the matrix of order 2:
$A = \begin{pmatrix} 3 & -1 \\ 2 & 5 \end{pmatrix}$
Calculate with reasoning, applying the properties of determinants:
-
a) The value of $|A|$.
-
b) The value of the determinant of its transpose, $|A^t|$.
-
c) The value of $|2A|$.
Given that the determinant of a matrix $A = \begin{pmatrix} x & y & z \\ p & q & r \\ a & b & c \end{pmatrix}$ is equal to $5$, use the properties of determinants to…
Given that the determinant of a matrix $A = \begin{pmatrix} x & y & z \\ p & q & r \\ a & b & c \end{pmatrix}$ is equal to $5$, use the properties of determinants to calculate, without expanding by Sarrus' rule, the value of the determinant of the following matrix $B$:
$$B = \begin{pmatrix} 2x & 2y & 2z \\ p+x & q+y & r+z \\ 3a & 3b & 3c \end{pmatrix}$$Indicate in detail which property you apply in each step of the simplification.
Invertible or singular?
Why? The product rule gives $|A|\cdot|A^{-1}|=|I|=1$, so $|A|$ can never be $0$ when an inverse exists. The reverse direction comes from the formula in the next sections.
There is also a geometric picture. The columns of a $2\times2$ matrix are two vectors, and $|\det|$ is the area of the parallelogram they span. A zero determinant means the parallelogram collapses to a line, and you cannot undo a collapse.
Zero determinants with a parameter
When the parameter shows up in only one row or column, the determinant is a polynomial in that parameter. If setting the parameter equal to another entry makes two columns identical, you have found a zero.
An engineer is designing an automatic control system. For the system to be stable, the coefficient matrix $M$ must not be singular (its determinant must be non-zero).…
An engineer is designing an automatic control system. For the system to be stable, the coefficient matrix $M$ must not be singular (its determinant must be non-zero). Given the matrix:
$M = \begin{pmatrix} m & 4 \\ 1 & m \end{pmatrix}$
Determine for which values of the real parameter $m$ the matrix $M$ is singular and, therefore, the system would not have an inverse.
Determine the values of the real parameter $a$ for which the following determinant of order 4 is zero. To solve it, use exclusively the properties of determinants to…
Determine the values of the real parameter $a$ for which the following determinant of order 4 is zero. To solve it, use exclusively the properties of determinants to simplify the expression before expanding along a row or column:
$$ |A| = \begin{vmatrix} 1 & 1 & 1 & 1 \\ a & 2 & -1 & 3 \\ a^2 & 4 & 1 & 9 \\ a^3 & 8 & -1 & 27 \end{vmatrix} $$(Hint: Notice that it has a structure similar to a Vandermonde determinant).
Cofactors and the adjugate
The sign $(-1)^{i+j}$ follows a checkerboard pattern that starts with $+$ in the top-left corner.
For a $2\times2$ matrix $\begin{pmatrix}a&b\\c&d\end{pmatrix}$ the cofactor matrix is $\begin{pmatrix}d&-c\\-b&a\end{pmatrix}$. Its transpose gives $\operatorname{adj}(A)=\begin{pmatrix}d&-b\\-c&a\end{pmatrix}$.
Why does this lead to the inverse? Multiply row $i$ of $A$ by column $i$ of $\operatorname{adj}(A)$. You get the cofactor expansion of $|A|$. Multiply row $i$ by column $j\neq i$. You get the determinant of a matrix with two equal rows, which is $0$. Therefore
$$A\cdot\operatorname{adj}(A)=|A|\cdot I.$$In a strategy video game, the transformation coordinates of a unit are managed by the matrix $B$: $B = \begin{pmatrix} 2 & 0 \\ -3 & 1 \end{pmatrix}$ Find the adjugate…
In a strategy video game, the transformation coordinates of a unit are managed by the matrix $B$:
$B = \begin{pmatrix} 2 & 0 \\ -3 & 1 \end{pmatrix}$
Find the adjugate matrix, $Adj(B)$, and check if the matrix $B$ has an inverse matrix by first calculating its determinant.
The inverse formula
Divide $A\cdot\operatorname{adj}(A)=|A|\,I$ by $|A|$ and you get the formula.
Calculate the inverse matrix $A^{-1}$ of the following matrix using the determinant method: $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$ Remember that the formula…
Calculate the inverse matrix $A^{-1}$ of the following matrix using the determinant method:
$A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$
Remember that the formula is $A^{-1} = \frac{1}{|A|} \cdot (Adj(A))^t$.
Given the matrix $A$ depending on the real parameter $k$: $$A = \begin{pmatrix} 1 & 0 & -1 \\ 0 & k & 3 \\ 4 & 1 & -k \end{pmatrix}$$ a) Determine with reasoning for…
Given the matrix $A$ depending on the real parameter $k$:
$$A = \begin{pmatrix} 1 & 0 & -1 \\ 0 & k & 3 \\ 4 & 1 & -k \end{pmatrix}$$- a) Determine with reasoning for which values of $k$ the matrix $A$ does not have an inverse matrix.
- b) For the case $k = 0$, calculate the inverse matrix $A^{-1}$ using the adjugate method.
A basic encryption system uses a matrix $K$ to transform messages in vector form. For the message to be decrypted, the matrix $K$ must be invertible. Given the matrix:…
A basic encryption system uses a matrix $K$ to transform messages in vector form. For the message to be decrypted, the matrix $K$ must be invertible. Given the matrix:
$$K = \begin{pmatrix} 1 & 2 & 0 \\ 0 & 1 & -1 \\ m & 0 & 3 \end{pmatrix}$$- a) Find the values of $m$ that make the encryption system insecure (the matrix is not invertible).
- b) If $m = 1$, calculate the decryption matrix $K^{-1}$.
Determinants of inverses, powers, and adjugates
It is known that the determinant of a square matrix $X$ of order 3 is $|X| = -4$. Without calculating the elements of the matrices, obtain the value of the following…
It is known that the determinant of a square matrix $X$ of order 3 is $|X| = -4$. Without calculating the elements of the matrices, obtain the value of the following determinants:
-
a) $|X^{-1}|$
-
b) $|X^2|$
-
c) $|X \cdot X^t|$
Let $A$ and $B$ be two square matrices of order 3 such that $|A| = 2$ and $|B| = -3$. Using the properties of determinants, calculate the value of the following…
Let $A$ and $B$ be two square matrices of order 3 such that $|A| = 2$ and $|B| = -3$. Using the properties of determinants, calculate the value of the following determinants:
- a) $|A^t \cdot B|$
- b) $|(2A)^{-1}|$
- c) $|A \cdot B^{-1} \cdot A^2|$
- d) $|B \cdot adj(B)|$ (Remember the relationship between a matrix, its adjugate and its determinant).
Let $A$ be a square matrix of order 3 such that its determinant is $|A| = \frac{1}{2}$. Without explicitly calculating the elements of the matrix, use the properties of…
Let $A$ be a square matrix of order 3 such that its determinant is $|A| = \frac{1}{2}$. Without explicitly calculating the elements of the matrix, use the properties of determinants to reasonably find the value of:
- a) $|A^{-1} \cdot (2A)^t|$
- b) $|Adj(A)|$, where $Adj(A)$ is the matrix formed by the cofactors of the elements of $A$.
- c) The determinant of the matrix $B$ if it is known that $A \cdot B = Adj(A)$.
Solving matrix equations
Matrices can't be divided, but you can multiply by $A^{-1}$. Since matrix multiplication is not commutative, you must multiply on the correct side, and on both sides of the equation.
Solve the matrix equation $A \cdot X = B$, where: $A = \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix}$ and $B = \begin{pmatrix} 4 & -1 \\ 2 & 6 \end{pmatrix}$ To do this,…
Solve the matrix equation $A \cdot X = B$, where:
$A = \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix}$ and $B = \begin{pmatrix} 4 & -1 \\ 2 & 6 \end{pmatrix}$
To do this, first calculate the inverse of $A$ using determinants and isolate the matrix $X$.
Solve the following matrix equation $X \cdot A + B = C$, where: $$A = \begin{pmatrix} 2 & 1 \\ 3 & 2 \end{pmatrix}, \quad B = \begin{pmatrix} 1 & 0 \\ -1 & 2…
Solve the following matrix equation $X \cdot A + B = C$, where:
$$A = \begin{pmatrix} 2 & 1 \\ 3 & 2 \end{pmatrix}, \quad B = \begin{pmatrix} 1 & 0 \\ -1 & 2 \end{pmatrix}, \quad C = \begin{pmatrix} 3 & 4 \\ 0 & 1 \end{pmatrix}$$First justify why it is possible to find the inverse matrix of $A$ and isolate the unknown $X$ before performing the numerical calculations.
A robotics company is designing the control system for a mechanical arm. The relationship between the sensors and the actuators is given by the matrix equation…
A robotics company is designing the control system for a mechanical arm. The relationship between the sensors and the actuators is given by the matrix equation $A \cdot X \cdot A = B$, where $A$ is a matrix that depends on the sensitivity $k$ of the sensor:
$$A = \begin{pmatrix} 1 & 0 & k \\ 0 & k & 1 \\ k & 0 & 1 \end{pmatrix}, \quad B = \begin{pmatrix} 2 & 0 & 1 \\ 0 & 4 & 0 \\ 1 & 0 & 2 \end{pmatrix}$$- a) Investigate for which values of $k \in \mathbb{R}$ the matrix $A$ is non-singular (invertible).
- b) For $k = 2$, isolate the matrix $X$ in the equation and calculate it using the adjugate matrix method to find the necessary inverses.
Using the inverse: systems and undoing transformations
A system $A\mathbf{x}=\mathbf{b}$ with $|A|\neq0$ has exactly one solution, $\mathbf{x}=A^{-1}\mathbf{b}$. If you don't remember writing a system as a matrix equation, see the Gaussian elimination page linked above. The same idea "undoes" a transformation: if a video game engine moves a point by a matrix $M$, then $M^{-1}$ puts it back.
In the design of a digital filter for audio signals, a transfer matrix $H$ is used, defined as: $$H(x) = \begin{pmatrix} x & 1 & 1 \\ 1 & x & 1 \\ 1 & 1 & x…
In the design of a digital filter for audio signals, a transfer matrix $H$ is used, defined as:
$$H(x) = \begin{pmatrix} x & 1 & 1 \\ 1 & x & 1 \\ 1 & 1 & x \end{pmatrix}$$- a) Find the values of the real parameter $x$ for which the determinant of the matrix is zero.
- b) For $x = 2$, calculate the inverse matrix $H^{-1}$. What is the significance of the determinant being very close to zero in engineering applications?
In the development of a new spaceship video game, the coordinates of objects in 3D space are transformed by a rotation and scaling matrix $M$. For the graphics engine to…
In the development of a new spaceship video game, the coordinates of objects in 3D space are transformed by a rotation and scaling matrix $M$. For the graphics engine to be able to "undo" the transformation, the matrix must have an inverse.
$$M = \begin{pmatrix} \cos \alpha & -\sin \alpha & 0 \\ \sin \alpha & \cos \alpha & 0 \\ 0 & 0 & e^a \end{pmatrix}$$- a) Show that the determinant of $M$ is $|M| = e^a$ for any value of the angle $\alpha$.
- b) Calculate the inverse matrix $M^{-1}$ in terms of $\alpha$ and $a$ using determinants.
- c) If an object ends up at position $(1, 1, 1)$ after applying $M$ with $\alpha = \frac{\pi}{2}$ and $a = 0$, what were its original coordinates?
Given the matrix $A = \begin{pmatrix} 1 & a & a^2 \\ 1 & b & b^2 \\ 1 & c & c^2 \end{pmatrix}$: a) Calculate $|A|$ and factorize the result. b) If $a=1, b=2, c=3$,…
Given the matrix $A = \begin{pmatrix} 1 & a & a^2 \\ 1 & b & b^2 \\ 1 & c & c^2 \end{pmatrix}$:
- a) Calculate $|A|$ and factorize the result.
- b) If $a=1, b=2, c=3$, calculate the inverse matrix $A^{-1}$ using the adjugate method.
- c) Solve the system of equations $A \cdot \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}$ using the inverse matrix found in part (b).
Rank of a matrix
An $n\times n$ matrix has rank $n$ exactly when $|A|\neq0$. For a rectangular matrix, such as a $3\times4$, the rank is at most $3$. To find it, look at the largest square submatrices first (the "minors"), then at smaller ones.
Consider the matrix $M = \begin{pmatrix} a & 0 & 2 \\ a & a & 1 \\ 0 & a & -1 \end{pmatrix}$. a) Calculate $|M|$ in terms of $a$. b) Determine the rank of the matrix $M$…
Consider the matrix $M = \begin{pmatrix} a & 0 & 2 \\ a & a & 1 \\ 0 & a & -1 \end{pmatrix}$.
- a) Calculate $|M|$ in terms of $a$.
- b) Determine the rank of the matrix $M$ according to the values of $a$.
- c) For $a = 1$, solve the matrix equation $M \cdot X = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}$.
An encryption system uses a matrix $C$ to transform message blocks. For the message to be recoverable, the rank of the matrix must be maximum. Investigate the rank of…
An encryption system uses a matrix $C$ to transform message blocks. For the message to be recoverable, the rank of the matrix must be maximum. Investigate the rank of the following matrix in terms of the real parameters $m$ and $n$:
$$C = \begin{pmatrix} 1 & m & 0 & 1 \\ n & 1 & 1 & 0 \\ 1 & 1 & 0 & m \end{pmatrix}$$Determine for which values of $m$ and $n$ the rank of $C$ is equal to 2.
Area of a triangle with a determinant
Determinants measure area. For a triangle with vertices $(x_1,y_1)$, $(x_2,y_2)$, $(x_3,y_3)$:
$$\text{Area}=\frac12\left|\begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix}\right|$$The absolute value matters: the determinant can be negative, but an area cannot. If the determinant is $0$, the three points lie on one line.
One of the most interesting applications of determinants in geometry is calculating areas. The area of a triangle whose vertices are $(x_1, y_1)$, $(x_2, y_2)$ and…
One of the most interesting applications of determinants in geometry is calculating areas. The area of a triangle whose vertices are $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ is given by the formula:
$Area = \frac{1}{2} \cdot | \det \begin{pmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1 \end{pmatrix} |$
Calculate the area of the triangle represented in the following graph whose vertices are $P(1, 1)$, $Q(5, 2)$ and $R(2, 4)$.
Matrix identities and orthogonal matrices
Sometimes you must prove something about $A^{-1}$ without knowing $A$'s entries. Use two tools: take determinants of both sides, or factor out $A$ to produce $A\cdot(\text{something})=I$.
Take determinants of $AA^t=I$: $|A|\cdot|A^t|=|A|^2=1$, so $|A|=1$ or $|A|=-1$. A rotation matrix like $\begin{pmatrix}\cos\alpha&-\sin\alpha\\\sin\alpha&\cos\alpha\end{pmatrix}$ has determinant $\cos^2\alpha+\sin^2\alpha=1$ and inverse equal to its transpose.
A square matrix $A$ is said to be orthogonal if it satisfies the condition $A \cdot A^t = I$, where $A^t$ is the transpose and $I$ is the identity matrix. a) Show that…
A square matrix $A$ is said to be orthogonal if it satisfies the condition $A \cdot A^t = I$, where $A^t$ is the transpose and $I$ is the identity matrix.
- a) Show that if $A$ is orthogonal, then its determinant can only be $1$ or $-1$.
- b) Check if the matrix $A = \begin{pmatrix} \cos \alpha & -\sin \alpha \\ \sin \alpha & \cos \alpha \end{pmatrix}$ is orthogonal and find its inverse $A^{-1}$ in terms of $\alpha$.
It is known that a square matrix $A$ satisfies the following equation: $A^2 - 5A + 6I = O$, where $I$ is the identity matrix and $O$ is the zero matrix. a) Show with…
It is known that a square matrix $A$ satisfies the following equation: $A^2 - 5A + 6I = O$, where $I$ is the identity matrix and $O$ is the zero matrix.
- a) Show with reasoning that the matrix $A$ is invertible.
- b) Express the inverse matrix $A^{-1}$ as a linear combination of the matrices $A$ and $I$.
- c) If $A = \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix}$, verify that it satisfies the initial equation and find its inverse using the result from part (b).
Consider the matrix $A = \begin{pmatrix} x & 1 & 1 \\ 1 & x & 1 \\ 1 & 1 & x \end{pmatrix}$. a) Find the polynomial $P(x) = |A|$. b) Determine the values of $x$ for…
Consider the matrix $A = \begin{pmatrix} x & 1 & 1 \\ 1 & x & 1 \\ 1 & 1 & x \end{pmatrix}$.
- a) Find the polynomial $P(x) = |A|$.
- b) Determine the values of $x$ for which $A$ does not have an inverse.
- c) For the values of $x$ for which $A$ is invertible, find the expression for $A^{-1}$ in terms of $x$.
- d) Verify that for $x=0$, $A^{-1} = \frac{1}{2}(A^2 - 3I)$ holds true.
Summary
Back to Sofia and Jayden. A matrix $K$ can be used as a code only if $|K|\neq0$. Take $K=\begin{pmatrix}2&1\\1&1\end{pmatrix}$: $|K|=1$, so $K^{-1}=\begin{pmatrix}1&-1\\-1&2\end{pmatrix}$. Sofia sends the letters $(1,2)$ as $K\cdot(1,2)^t=(4,3)^t$. Jayden computes $K^{-1}\cdot(4,3)^t=(4-3,\,-4+6)^t=(1,2)^t$ and reads the original message.