## Determinants of 2-by-2 Square Matrices

The determinant of a $2\times 2$ square matrix is a mathematical construct used in problem solving that is found by a special formula.

### Learning Objectives

Practice finding the determinant of a $2\times 2$ matrix

### Key Takeaways

#### Key Points

• The determinant of a $2 \times 2$ matrix $\begin{bmatrix}a&b\\c&d\end{bmatrix}$ is defined to be $ad-bc$.
• A matrix is often used to represent the coefficients in a system of linear equations, and the determinant can be used to solve those equations.
• Any matrix has a unique inverse if its determinant is nonzero.

#### Key Terms

• determinant: The unique scalar function over square matrices which is distributive over matrix multiplication, multilinear in the rows and columns, and takes the value of 1 for the unit matrix. Its abbreviation is “$\det$“.

### What is a determinant?

A matrix is often used to represent the coefficients in a system of linear equations, and the determinant can be used to solve those equations. The use of determinants in calculus includes the Jacobian determinant in the change of variables rule for integrals of functions of several variables. Determinants are also used to define the characteristic polynomial of a matrix, which is essential for eigenvalue problems in linear algebra. In analytical geometry, determinants express the signed $n$-dimensional volumes of $n$-dimensional parallelepipeds. Sometimes, determinants are used merely as a compact notation for expressions that would otherwise be unwieldy to write down.

It can be proven that any matrix has a unique inverse if its determinant is nonzero. Various other theorems can be proved as well, including that the determinant of a product of matrices is always equal to the product of determinants; and, the determinant of a Hermitian matrix is always real.

The determinant of a matrix $[A]$ is denoted $\det(A)$, $\det\ A$, or $\left | A \right |$. In the case where the matrix entries are written out in full, the determinant is denoted by surrounding the matrix entries by vertical bars instead of the brackets or parentheses of the matrix.

For instance, the determinant of the matrix $\begin{bmatrix} a & b \\ d & e \end{bmatrix}$ is written $\begin{vmatrix} a & b \\ d & e \end{vmatrix}$.

### Determinant of a 2-by-2 Matrix

In linear algebra, the determinant is a value associated with a square matrix. It can be computed from the entries of the matrix by a specific arithmetic expression, shown below:

For a $2 \times 2$ matrix, $\begin{bmatrix} a & b\\ c & d \end{bmatrix}$,

the determinant $\begin{vmatrix} a & b\\ c & d \end{vmatrix}$ is defined to be $ad-bc$.

### $\displaystyle \begin{bmatrix} 4 & -2 \\ 7 & 5 \end{bmatrix}$

The determinant $\begin{vmatrix} 4 & -2\\ 7 & 5 \end{vmatrix}$ is:

\displaystyle \begin{align} (4 \cdot 5) - (-2 \cdot 7)&= 20 - (-14)\\ &=34 \end{align}

## Cofactors, Minors, and Further Determinants

The cofactor of an entry $(i,j)$ of a matrix $A$ is the signed minor of that matrix.

### Learning Objectives

Explain how to use minor and cofactor matrices to calculate determinants

### Key Takeaways

#### Key Points

• Let $A$ be an $m \times n$ matrix and $k$ an integer with $0<k\leq m$, and $k \leq n$.  A $k \times k$ minor of $A$ is the determinant of a $k \times k$ matrix obtained from $A$ by deleting $m-k$ rows and $n-k$ columns.
• The first minor of a matrix $M_{ij}$ is formed by removing the $i$th row and $j$th column of the matrix, and retrieving the determinant of the smaller matrix.
• The cofactor of an element $a_{ij}$ of a matrix $A$, written as $C_{ij}$ is defined as $(-1)^{i+j}M_{ij}$.

#### Key Terms

• cofactor: The signed minor of an entry of a matrix.
• minor: The determinant of some smaller square matrix, cut down from matrix $A$ by removing one or more of its rows or columns.

### Cofactor

In linear algebra, the cofactor (sometimes called adjunct) describes a particular construction that is useful for calculating both the determinant and inverse of square matrices. Specifically the cofactor of the $(i,j)$ entry of a matrix, also known as the $(i,j)$ cofactor of that matrix, is the signed minor of that entry.

The cofactor of $a_{ij}$ entry of a matrix is defined as:

$\displaystyle C_{ij}=(-1)^{i+j}M_{ij}$

### Minor

To know what the signed minor is, we need to know what the minor of a matrix is. In linear algebra, a minor of a matrix $A$ is the determinant of some smaller square matrix, cut down from $A$ by removing one or more of its rows or columns. Minors obtained by removing just one row and one column from square matrices (first minors) are required for calculating matrix cofactors.

Let $A$ be an $m \times n$ matrix and $k$ an integer with $0<k\leq m$, and $k \leq n$.  A $k \times k$ minor of $A$ is the determinant of a $k \times k$ matrix obtained from $A$ by deleting $m-k$ rows and $n-k$ columns.

### Calculate the Determinant

The determinant of any matrix can be found using its signed minors. The determinant is the sum of the signed minors of any row or column of the matrix scaled by the elements in that row or column.

### Calculating the Minors

The following steps are used to find the determinant of a given minor of a matrix A:

1. Choose an entry $a_{ij}$ from the matrix.
2. Cross out the entries that lie in the corresponding row $i$ and column $j$.
3. Rewrite the matrix without the marked entries.
4. Obtain the determinant of this new matrix.

$M_{ij}$ is termed the minor for entry $a_{ij}$.

Note: If $i+j$ is an even number, the cofactor coincides with its minor: $C_{ij}=M_{ij}$. Otherwise, it is equal to the additive inverse of its minor: $C_{ij}=-M_{ij}$

### Calculating the Determinant

We will find the determinant of the following matrix A by calculating the determinants of its cofactors for the third, rightmost column and then multiplying them by the elements of that column.

$\displaystyle \begin{bmatrix} 1 & 4 & 7\\ 3 & 0 & 5\\ -1& 9 &11\\ \end{bmatrix}$

As an example, we will calculate the determinant of the minor $M_{23}$, which is the determinant of the $2 \times 2$ matrix formed by removing the $2$nd row and $3$rd column.  A black dot represents an element we are removing.

\displaystyle \begin{align} \begin{vmatrix} 1 & 4 & \bullet\\ \bullet& \bullet& \bullet\\ -1& 9 &\bullet \end{vmatrix} &= \begin{vmatrix} 1 & 4\\ -1&9 \end{vmatrix}\\ &=(9-(-4))\\&=13 \end{align}

Since $i+j=5$ is an odd number, the cofactor is the additive inverse of its minor: $-(13)=-13$

We multiply this number by $a_{23}=5$, giving $-65$.

The same process is carried out to find the determinants of $C_{13}$ and $C_{33}$, which are then multiplied by $a_{13}$ and $a_{33}$, respectively. The determinant is then found by summing all of these:

\begin {align} \det{A} &= a_{13}\det{C_{13}}+a_{23}\det{C_{23}}+a_{33}\det{C_{33}} \\ &= 7\cdot27-5\cdot13+11\cdot-12 \\&=-8 \end{align}

## Cramer’s Rule

Cramer’s Rule uses determinants to solve for a solution to the equation $Ax=b$, when $A$ is a square matrix.

### Learning Objectives

Use Cramer’s Rule to solve for a single variable in a system of linear equations

### Key Takeaways

#### Key Points

• Cramer’s Rule only works on square matrices that have a non-zero determinant and a unique solution.
• Consider the linear system $\left\{\begin{matrix} ax+by & ={\color{Red}e}\\ cx+dy & ={\color{Red}f} \end{matrix}\right.$, which in matrix format is $\begin{bmatrix}a&b\\c&d\end{bmatrix} \begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}{\color{Red}e}\\{\color{Red}f}\end{bmatrix}$.   Assume the determinant is non-zero. Then, $x$ and $y$ and be found by Cramer’s rule: $x=\frac{\begin{vmatrix}{\color{Red}e}&b\\{\color{Red}f}&d\end{vmatrix}}{\begin{vmatrix}a&b\\c&d\end{vmatrix}}=\frac{{\color{Red}e}d-b{\color{Red}f}}{ad-bc}$  and $y=\frac{\begin{vmatrix}a&{\color{Red}e}\\c&{\color{Red}f}\end{vmatrix}}{\begin{vmatrix}a&b\\c&d\end{vmatrix}}=\frac{a{\color{Red}f}-{\color{Red}e}c}{ad-bc}$.
• Cramer’s Rule is efficient for solving small systems and can be calculated quite quickly; however, as the system grows, calculating the new determinants can be tedious.

#### Key Terms

• determinant: The unique scalar function over square matrices which is distributive over matrix multiplication, multilinear in the rows and columns, and takes the value of $1$ for the unit matrix. Its abbreviation is “$\det$“.
• square matrix: A matrix having the same number of rows as columns.

“Cramer’s Rule” is another way to solve a system of linear equations with matrices.  It uses a formula to calculate the solution to the system utilizing the definition of determinants.

### Cramer’s Rule:  Definition

Cramer’s Rule is an explicit formula for the solution of a system of linear equations with as many equations as unknowns, i.e. a square matrix, valid whenever the system has a unique solution. It expresses the solution in terms of the determinants of the (square) coefficient matrix and of matrices obtained from it by replacing one column by the vector of right hand sides of the equations.

### Rules for a $2\times 2$ Matrix

Consider the linear system:

$\displaystyle \begin{bmatrix}a&b\\c&d\end{bmatrix} \begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}{\color{Red}e}\\{\color{Red}f}\end{bmatrix}$

Assume the determinant is non-zero. Then, $x$ and $y$ can be found by Cramer’s rule:

$\displaystyle x=\frac{\begin{vmatrix}{\color{Red}e}&b\\{\color{Red}f}&d\end{vmatrix}}{\begin{vmatrix}a&b\\c&d\end{vmatrix}}=\frac{{\color{Red}e}d-b{\color{Red}f}}{ad-bc}$

And:

$\displaystyle y=\frac{\begin{vmatrix}a&{\color{Red}e}\\c&{\color{Red}f}\end{vmatrix}}{\begin{vmatrix}a&b\\c&d\end{vmatrix}}=\frac{a{\color{Red}f}-{\color{Red}e}c}{ad-bc}$

### Rules for a $3 \times 3$ Matrix

Given:

$\displaystyle \begin{bmatrix}a&b&c\\d&e&f\\g&h&i\end{bmatrix} \begin{bmatrix}x\\y\\z\end{bmatrix}=\begin{bmatrix}{\color{Red}j}\\{\color{Red}k}\\{\color{Red}l}\end{bmatrix}$

Then the values of $x$, $y$ and $z$ can be found as follows:

$\displaystyle x=\frac{\begin{vmatrix}{\color{Red}j}&b&c\\{\color{Red}k}&e&f\\{\color{Red}l}&h&i\end{vmatrix}}{\begin{vmatrix}a&b&c\\d&e&f\\g&h&i\end{vmatrix}} \quad y=\frac{\begin{vmatrix}a&{\color{Red}j}&c\\d&{\color{Red}k}&f\\g&{\color{Red}l}&i\end{vmatrix}}{\begin{vmatrix}a&b&c\\d&e&f\\g&h&i\end{vmatrix}} \quad z=\frac{\begin{vmatrix}a&b&{\color{Red}j}\\d&e&{\color{Red}k}\\g&h&{\color{Red}l}\end{vmatrix}}{\begin{vmatrix}a&b&c\\d&e&f\\g&h&i\end{vmatrix}}$

### Example 1:  Solve the system using Cramer’s Rule:

$\displaystyle \left\{\begin{matrix} 3x+2y & = 10\\ -6x+4y & = 4 \end{matrix}\right.$

In matrix format:

$\displaystyle \begin{bmatrix}3&2\\-6&4\end{bmatrix} \begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}10\\4\end{bmatrix}$

\displaystyle \begin{align} x&=\frac{\begin{vmatrix}{\color{Red}e}&b\\{\color{Red}f}&d\end{vmatrix}}{\begin{vmatrix}a&b\\c&d\end{vmatrix}}\\&=\frac{{\color{Red}e}d-b{\color{Red}f}}{ad-bc}\end{align}

\displaystyle \begin{align} x&=\frac{\begin{vmatrix}10&2\\4&4\end{vmatrix}}{\begin{vmatrix}3&2\\-6&4\end{vmatrix}}\\&=\frac{10\cdot 4-2 \cdot 4}{(3 \cdot 4) -[2 \cdot (-6)]}\\&=\frac{32}{24}=\frac{4}{3}\end{align}

\displaystyle \begin{align} y&=\frac{\begin{vmatrix}a&{\color{Red}e}\\c&{\color{Red}f}\end{vmatrix}}{\begin{vmatrix}a&b\\c&d\end{vmatrix}}\\ &=\frac{a{\color{Red}f}-{\color{Red}e}c}{ad-bc} \end{align}

\displaystyle \begin{align} y&=\frac{\begin{vmatrix}3&10\\-6&4\end{vmatrix}}{\begin{vmatrix}3&2\\-6&4\end{vmatrix}}\\ &=\frac{(3 \cdot 4)-[10 \cdot(-6)]}{(3 \cdot 4)-[2 \cdot (-6)]}\\ &=\frac{72}{24}=3 \end{align}

The solution to the system is $(\frac{4}{3}, 3)$.