Chapter 18

Matrix Algebra

Matrix Anatomy and Equality

Matrix Anatomy and Equality

Matrices are rectangular arrangements of numbers. They help organize information clearly and are used in many areas of mathematics, science, economics, and technology.

Before students can add, subtract, or multiply matrices, they must understand a matrix’s anatomy: its rows, columns, order, and entries. They also need to know when two matrices are considered equal.

This lesson explains how to read a matrix, describe its size, name its elements, and decide whether two matrices are equal.

1. What is a matrix?

A matrix is a rectangular array of numbers arranged in rows and columns. A single number inside a matrix is called an element or an entry.

For example, in the matrix

$$ A=\begin{bmatrix} 2 & 5 & -1\\ 0 & 3 & 4 \end{bmatrix} $$

the numbers are arranged in rows and columns.

  • The first row is \([2\; 5\; -1]\).
  • The second row is \([0\; 3\; 4]\).
  • The first column is $$\begin{bmatrix}2\\0\end{bmatrix}$$
  • The second column is $$\begin{bmatrix}5\\3\end{bmatrix}$$
  • The third column is $$\begin{bmatrix}-1\\4\end{bmatrix}$$

2. Order of a matrix

The order of a matrix tells its dimensions. It is written as

\(\text{number of rows} \times \text{number of columns}\).

For the matrix

$$ A=\begin{bmatrix} 2 & 5 & -1\\ 0 & 3 & 4 \end{bmatrix} $$

there are 2 rows and 3 columns, so its order is

$$ 2\times 3 $$

This is read as “2 by 3.”

Here are some examples of matrix orders:

  • A matrix with 3 rows and 2 columns has order \(3\times 2\).
  • A matrix with 4 rows and 4 columns has order \(4\times 4\).
  • A matrix with 1 row and 5 columns has order \(1\times 5\).
  • A matrix with 6 rows and 1 column has order \(6\times 1\).

Important: Order matters. A \(2\times 3\) matrix is not the same size as a \(3\times 2\) matrix.

3. Naming elements in a matrix

Each element in a matrix can be named by its position. The usual notation is \(a_{ij}\), which means:

  • \(i\) = row number
  • \(j\) = column number

So \(a_{ij}\) means the entry in the ith row and jth column.

For example, consider

$$ B=\begin{bmatrix} 7 & -2 & 5\\ 1 & 0 & 9\\ 4 & 6 & -3 \end{bmatrix} $$

Then:

  • \(b_{11}=7\) because it is in row 1, column 1
  • \(b_{12}=-2\) because it is in row 1, column 2
  • \(b_{23}=9\) because it is in row 2, column 3
  • \(b_{31}=4\) because it is in row 3, column 1
  • \(b_{33}=-3\) because it is in row 3, column 3

When identifying an element, always read row first, then column.

4. General form of a matrix

A matrix can be written in general form as

$$ A=\begin{bmatrix} a_{11} & a_{12} & a_{13} & \cdots & a_{1n}\\ a_{21} & a_{22} & a_{23} & \cdots & a_{2n}\\ a_{31} & a_{32} & a_{33} & \cdots & a_{3n}\\ \vdots & \vdots & \vdots & \ddots & \vdots\\ a_{m1} & a_{m2} & a_{m3} & \cdots & a_{mn} \end{bmatrix} $$

This means the matrix has \(m\) rows and \(n\) columns, so its order is \(m\times n\).

You do not need to memorize this entire pattern. The important idea is that each entry is named using its row and column position.

5. Special note about rows and columns

A matrix with only one row is called a row matrix (or row vector in some contexts).

Example:

$$ \begin{bmatrix}3 & 8 & -1 & 6\end{bmatrix} $$

Its order is \(1\times 4\).

A matrix with only one column is called a column matrix (or column vector in some contexts).

Example:

$$ \begin{bmatrix}5\\2\\-7\end{bmatrix} $$

Its order is \(3\times 1\).

6. Equality of matrices

Two matrices are equal only if both of these conditions are true:

  1. They have the same order.
  2. Each corresponding element is equal.

In symbols, matrices \(A\) and \(B\) are equal if:

  • they have the same dimensions, and
  • for every position \((i,j)\), \(a_{ij}=b_{ij}\).

For example,

$$ A=\begin{bmatrix}1 & 4\\2 & -3\end{bmatrix}, \qquad B=\begin{bmatrix}1 & 4\\2 & -3\end{bmatrix} $$

Since both are \(2\times 2\) and every matching entry is the same, \(A=B\).

But if even one entry is different, the matrices are not equal.

For example,

$$ A=\begin{bmatrix}1 & 4\\2 & -3\end{bmatrix}, \qquad C=\begin{bmatrix}1 & 4\\2 & 3\end{bmatrix} $$

These matrices are not equal because the bottom-right entry is different: \(-3\neq 3\).

Also, if the orders are different, the matrices cannot be equal, even if some numbers match.

For example,

$$ \begin{bmatrix}1 & 2 & 3\\4 & 5 & 6\end{bmatrix} \neq \begin{bmatrix}1 & 2\\3 & 4\\5 & 6\end{bmatrix} $$

The first matrix has order \(2\times 3\), while the second has order \(3\times 2\).

7. Using equality to find unknown values

If two matrices are equal, then the entries in matching positions must be equal. This allows us to form equations and solve for unknowns.

For example, if

$$ \begin{bmatrix} x+1 & 2y\\ 3 & y-4 \end{bmatrix} = \begin{bmatrix} 5 & 8\\ 3 & 0 \end{bmatrix} $$

then corresponding entries must match:

  • \(x+1=5\)
  • \(2y=8\)
  • \(3=3\)
  • \(y-4=0\)

Solving gives:

  • \(x=4\)
  • \(y=4\)

Notice that both equations involving \(y\) agree, which confirms the solution is correct.

Worked Example 1: Finding the order

Find the order of

$$ M=\begin{bmatrix} 3 & 1 & 0 & -2\\ 5 & 4 & 7 & 6 \end{bmatrix} $$

Step 1: Count the rows.

There are 2 rows.

Step 2: Count the columns.

There are 4 columns.

Answer: The order of \(M\) is

$$ 2\times 4 $$

Worked Example 2: Identifying an element

Given

$$ N=\begin{bmatrix} 8 & -1 & 3\\ 0 & 6 & 5\\ 4 & 2 & 9 \end{bmatrix} $$

find:

  • \(n_{21}\)
  • \(n_{32}\)
  • \(n_{13}\)

Step 1: Remember that the first number in the subscript is the row, and the second is the column.

Step 2: Read each position carefully.

  • \(n_{21}\): row 2, column 1 = \(0\)
  • \(n_{32}\): row 3, column 2 = \(2\)
  • \(n_{13}\): row 1, column 3 = \(3\)

Answer:

$$ n_{21}=0, \qquad n_{32}=2, \qquad n_{13}=3 $$

Worked Example 3: Deciding whether two matrices are equal

Determine whether

$$ P=\begin{bmatrix} 2 & 7\\ -1 & 5 \end{bmatrix} \quad \text{and} \quad Q=\begin{bmatrix} 2 & 7\\ -1 & 5 \end{bmatrix} $$

are equal.

Step 1: Compare the orders.

Both matrices are \(2\times 2\).

Step 2: Compare corresponding entries.

  • Top-left: \(2=2\)
  • Top-right: \(7=7\)
  • Bottom-left: \(-1=-1\)
  • Bottom-right: \(5=5\)

Conclusion: Since the orders are the same and all corresponding entries are equal,

$$ P=Q $$

Worked Example 4: Finding unknowns using matrix equality

If

$$ \begin{bmatrix} 2x & y+3\\ 4 & 3y \end{bmatrix} = \begin{bmatrix} 10 & 7\\ 4 & 12 \end{bmatrix} $$

find \(x\) and \(y\).

Step 1: Match corresponding elements.

  • \(2x=10\)
  • \(y+3=7\)
  • \(4=4\)
  • \(3y=12\)

Step 2: Solve the equations.

From \(2x=10\),

$$ x=5 $$

From \(y+3=7\),

$$ y=4 $$

Check with \(3y=12\):

$$ 3(4)=12 $$

This is true, so the values are correct.

Answer:

$$ x=5, \qquad y=4 $$

Common mistakes to avoid

  • Mixing up rows and columns: In \(a_{ij}\), the row comes first.
  • Writing the order backwards: Always write rows \(\times\) columns.
  • Assuming same numbers means equal matrices: The numbers must be in the same positions, and the matrices must have the same order.
  • Ignoring one mismatched entry: If even one corresponding element is different, the matrices are not equal.

Quick check for understanding

For the matrix

$$ R=\begin{bmatrix} 1 & 4 & 8\\ -2 & 0 & 5 \end{bmatrix} $$
  • Its order is \(2\times 3\).
  • \(r_{12}=4\).
  • \(r_{23}=5\).
  • It has 2 rows and 3 columns.

If another matrix has the same order but one entry is different, then it is not equal to \(R\).

Summary

A matrix is a rectangular arrangement of numbers in rows and columns. Its order is written as rows \(\times\) columns. Each element is identified by its position, written as \(a_{ij}\), where \(i\) is the row and \(j\) is the column.

Two matrices are equal only when they have the same order and every corresponding element is equal. This idea also helps us find unknown values by matching entries in the same positions.

Put what you read to the test

You've worked through Matrix Anatomy and Equality. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.

Matrix Addition and Scalar Multiplication

Matrix Addition and Scalar Multiplication

Matrices are rectangular arrays of numbers arranged in rows and columns. They are useful for organizing information and doing calculations in a structured way.

In this lesson, you will learn how to add matrices, subtract matrices, and multiply a matrix by a scalar. A scalar is just a single number.

These operations are important because they are the basic arithmetic of matrix algebra. Once you understand them, you can work with larger matrix problems more confidently.

1. What is a matrix?

A matrix is a table of numbers. For example,

$$ A = \begin{bmatrix} 2 & 5 \\ -1 & 3 \end{bmatrix} $$

has 2 rows and 2 columns, so it is called a 2 by 2 matrix.

The size of a matrix is called its dimensions. A matrix with 3 rows and 2 columns has dimensions \(3 \times 2\).

2. Matrix addition

Two matrices can be added only if they have the same dimensions. This means they must have the same number of rows and the same number of columns.

To add matrices, add the numbers in matching positions. This is called entry-wise addition.

If

$$ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \quad B = \begin{bmatrix} e & f \\ g & h \end{bmatrix} $$

then

$$ A + B = \begin{bmatrix} a+e & b+f \\ c+g & d+h \end{bmatrix} $$

Each entry in the answer comes from adding the corresponding entries of the two matrices.

3. Matrix subtraction

Matrix subtraction works the same way as addition. The matrices must also have the same dimensions.

Subtract each entry in the second matrix from the matching entry in the first matrix.

If

$$ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \quad B = \begin{bmatrix} e & f \\ g & h \end{bmatrix} $$

then

$$ A - B = \begin{bmatrix} a-e & b-f \\ c-g & d-h \end{bmatrix} $$

4. Scalar multiplication

A scalar is a single number, such as \(2\), \(-3\), or \(\frac{1}{2}\).

To multiply a matrix by a scalar, multiply every entry in the matrix by that number.

If

$$ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} $$

then multiplying by a scalar \(k\) gives

$$ kA = \begin{bmatrix} ka & kb \\ kc & kd \end{bmatrix} $$

Scalar multiplication changes the values in the matrix, but it does not change the dimensions of the matrix.

5. Important rules to remember

  • Addition and subtraction: only possible when the matrices have the same dimensions.
  • Scalar multiplication: multiply every entry by the scalar.
  • Dimensions stay the same after addition, subtraction, or scalar multiplication.

6. Worked Example 1: Adding two matrices

Find

$$ \begin{bmatrix} 1 & 4 \\ -2 & 7 \end{bmatrix} + \begin{bmatrix} 3 & -1 \\ 5 & 2 \end{bmatrix} $$

Step 1: Check dimensions.

Both matrices are \(2 \times 2\), so addition is possible.

Step 2: Add matching entries.

$$ \begin{bmatrix} 1+3 & 4+(-1) \\ -2+5 & 7+2 \end{bmatrix} = \begin{bmatrix} 4 & 3 \\ 3 & 9 \end{bmatrix} $$

Answer:

$$ \begin{bmatrix} 4 & 3 \\ 3 & 9 \end{bmatrix} $$

7. Worked Example 2: Subtracting matrices

Find

$$ \begin{bmatrix} 6 & 0 \\ -3 & 8 \end{bmatrix} - \begin{bmatrix} 2 & 5 \\ -1 & 4 \end{bmatrix} $$

Step 1: Check dimensions.

Both are \(2 \times 2\), so subtraction is possible.

Step 2: Subtract matching entries.

$$ \begin{bmatrix} 6-2 & 0-5 \\ -3-(-1) & 8-4 \end{bmatrix} = \begin{bmatrix} 4 & -5 \\ -2 & 4 \end{bmatrix} $$

Answer:

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

8. Worked Example 3: Scalar multiplication

Find \(-3A\) if

$$ A = \begin{bmatrix} 2 & -4 \\ 1 & 5 \end{bmatrix} $$

Step 1: Multiply every entry by \(-3\).

$$ -3A = -3\begin{bmatrix} 2 & -4 \\ 1 & 5 \end{bmatrix} = \begin{bmatrix} -3(2) & -3(-4) \\ -3(1) & -3(5) \end{bmatrix} $$

Step 2: Simplify.

$$ \begin{bmatrix} -6 & 12 \\ -3 & -15 \end{bmatrix} $$

Answer:

$$ \begin{bmatrix} -6 & 12 \\ -3 & -15 \end{bmatrix} $$

9. Worked Example 4: Combining scalar multiplication and addition

Find

$$ 2\begin{bmatrix} 1 & -2 \\ 3 & 0 \end{bmatrix} + \begin{bmatrix} 4 & 5 \\ -1 & 6 \end{bmatrix} $$

Step 1: Multiply the first matrix by 2.

$$ 2\begin{bmatrix} 1 & -2 \\ 3 & 0 \end{bmatrix} = \begin{bmatrix} 2 & -4 \\ 6 & 0 \end{bmatrix} $$

Step 2: Add the two matrices.

$$ \begin{bmatrix} 2 & -4 \\ 6 & 0 \end{bmatrix} + \begin{bmatrix} 4 & 5 \\ -1 & 6 \end{bmatrix} = \begin{bmatrix} 2+4 & -4+5 \\ 6+(-1) & 0+6 \end{bmatrix} $$ $$ = \begin{bmatrix} 6 & 1 \\ 5 & 6 \end{bmatrix} $$

Answer:

$$ \begin{bmatrix} 6 & 1 \\ 5 & 6 \end{bmatrix} $$

10. When matrix addition is not possible

Consider these two matrices:

$$ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}, \quad B = \begin{bmatrix} 7 & 8 \\ 9 & 10 \end{bmatrix} $$

Matrix \(A\) is \(2 \times 3\), and matrix \(B\) is \(2 \times 2\).

Because their dimensions are different, \(A + B\) and \(A - B\) are not defined.

This is a very common mistake. Before adding or subtracting, always check the dimensions first.

11. Common mistakes to avoid

  • Adding matrices with different dimensions. This is not allowed.
  • Forgetting to add or subtract matching positions only. Do not mix entries from different places.
  • Missing negative signs. Be especially careful when subtracting negative numbers.
  • For scalar multiplication, forgetting to multiply every entry. Every number in the matrix must be multiplied by the scalar.

12. Quick practice questions

Try these on your own:

  1. $$ \begin{bmatrix} 2 & 1 \\ 0 & -3 \end{bmatrix} + \begin{bmatrix} 4 & -2 \\ 5 & 6 \end{bmatrix} $$
  2. $$ \begin{bmatrix} 7 & -1 \\ 2 & 4 \end{bmatrix} - \begin{bmatrix} 3 & 5 \\ -2 & 1 \end{bmatrix} $$
  3. $$ 4\begin{bmatrix} -1 & 3 \\ 2 & 0 \end{bmatrix} $$

Answers:

  1. $$ \begin{bmatrix} 6 & -1 \\ 5 & 3 \end{bmatrix} $$
  2. $$ \begin{bmatrix} 4 & -6 \\ 4 & 3 \end{bmatrix} $$
  3. $$ \begin{bmatrix} -4 & 12 \\ 8 & 0 \end{bmatrix} $$

13. Summary

Matrix addition and subtraction are done by combining corresponding entries, but only when the matrices have the same dimensions.

Scalar multiplication means multiplying every entry in a matrix by the same number.

If you remember to check dimensions first and work carefully entry by entry, you can do these matrix operations accurately and confidently.

Put what you read to the test

You've worked through Matrix Addition and Scalar Multiplication. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.

Matrix Multiplication

Matrix Multiplication is a way of combining two matrices to create a new matrix. It is one of the most important ideas in matrix algebra because it helps us represent repeated calculations, organize data, and solve systems involving several variables.

Unlike adding or subtracting matrices, matrix multiplication is not done by multiplying matching entries in the same position. Instead, each entry in the product comes from a dot product: we multiply entries from a row of the first matrix by entries from a column of the second matrix, then add the results.

In this lesson, you will learn:

  • when two matrices can be multiplied,
  • how to compute each entry of the product,
  • how to find the size of the answer, and
  • why matrix multiplication is generally non-commutative, meaning that usually \(AB \ne BA\).

1. Sizes of matrices and compatibility

A matrix is described by its dimensions: rows \(\times\) columns. For example, a \(2 \times 3\) matrix has 2 rows and 3 columns.

Suppose

$$A_{m\times n} \text{ and } B_{n\times p}.$$

The product \(AB\) is defined only if the number of columns in \(A\) equals the number of rows in \(B\). These matching middle numbers must be the same.

When multiplication is possible, the product matrix \(AB\) will have size

$$m \times p.$$

A good way to remember this is:

Inside numbers must match; outside numbers give the answer's size.

For example:

  • \((2 \times 3)(3 \times 4)\) is possible, and the result is \(2 \times 4\).
  • \((3 \times 2)(2 \times 1)\) is possible, and the result is \(3 \times 1\).
  • \((2 \times 3)(2 \times 2)\) is not possible, because the inside numbers \(3\) and \(2\) do not match.

2. The rule for finding each entry

If \(A\) and \(B\) can be multiplied, then each entry in \(AB\) is found by taking a row from \(A\) and a column from \(B\).

If \(A = [a_{ij}]\) and \(B = [b_{ij}]\), then the entry in row \(i\), column \(j\) of \(AB\) is:

$$ (AB)_{ij} = a_{i1}b_{1j} + a_{i2}b_{2j} + a_{i3}b_{3j} + \cdots $$

In simpler words:

  • Take row \(i\) from the first matrix.
  • Take column \(j\) from the second matrix.
  • Multiply corresponding entries.
  • Add the products.

This is exactly a dot product.

3. Example 1: Multiplying a row matrix by a column matrix

Find

$$ \begin{bmatrix} 2 & 3 \end{bmatrix} \begin{bmatrix} 4 \\ 5 \end{bmatrix}. $$

First check the dimensions:

  • The first matrix is \(1 \times 2\).
  • The second matrix is \(2 \times 1\).

The inside numbers match, so multiplication is possible. The result will be \(1 \times 1\).

Now compute the single entry using the dot product:

$$2(4) + 3(5) = 8 + 15 = 23.$$

So,

$$ \begin{bmatrix} 2 & 3 \end{bmatrix} \begin{bmatrix} 4 \\ 5 \end{bmatrix} = \begin{bmatrix} 23 \end{bmatrix}. $$

4. Example 2: Multiplying two \(2 \times 2\) matrices

Find

$$ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}, \quad AB. $$

Both matrices are \(2 \times 2\), so the product is defined and the answer will also be \(2 \times 2\).

We find each entry one at a time.

Entry in row 1, column 1:

$$1(5) + 2(7) = 5 + 14 = 19$$

Entry in row 1, column 2:

$$1(6) + 2(8) = 6 + 16 = 22$$

Entry in row 2, column 1:

$$3(5) + 4(7) = 15 + 28 = 43$$

Entry in row 2, column 2:

$$3(6) + 4(8) = 18 + 32 = 50$$

Therefore,

$$ AB = \begin{bmatrix} 19 & 22 \\ 43 & 50 \end{bmatrix}. $$

5. Organizing the work carefully

When multiplying matrices, students often make mistakes by losing track of which row and column they are using. A neat method is:

  1. Write the size of each matrix.
  2. Check that the inside numbers match.
  3. Write the size of the result.
  4. Fill in the product one entry at a time.
  5. For each entry, clearly identify the row from the first matrix and the column from the second.

This careful structure helps prevent errors.

6. Example 3: A \(2 \times 3\) times a \(3 \times 2\) matrix

Find

$$ A = \begin{bmatrix} 1 & 0 & 2 \\ -1 & 3 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 3 & 1 \\ 2 & 4 \\ 5 & -2 \end{bmatrix}. $$

First check dimensions:

  • \(A\) is \(2 \times 3\)
  • \(B\) is \(3 \times 2\)

The inside numbers match, so \(AB\) is defined. The result will be \(2 \times 2\).

Now calculate each entry.

Row 1 of \(A\) is \([1, 0, 2]\).

Column 1 of \(B\) is

$$ \begin{bmatrix} 3 \\ 2 \\ 5 \end{bmatrix} $$

So the entry in row 1, column 1 is:

$$1(3) + 0(2) + 2(5) = 3 + 0 + 10 = 13$$

Column 2 of \(B\) is

$$ \begin{bmatrix} 1 \\ 4 \\ -2 \end{bmatrix} $$

So the entry in row 1, column 2 is:

$$1(1) + 0(4) + 2(-2) = 1 + 0 - 4 = -3$$

Row 2 of \(A\) is \([-1, 3, 1]\).

Using column 1 of \(B\):

$$(-1)(3) + 3(2) + 1(5) = -3 + 6 + 5 = 8$$

Using column 2 of \(B\):

$$(-1)(1) + 3(4) + 1(-2) = -1 + 12 - 2 = 9$$

Therefore,

$$ AB = \begin{bmatrix} 13 & -3 \\ 8 & 9 \end{bmatrix}. $$

7. When multiplication is not possible

Not every pair of matrices can be multiplied. For example, suppose

$$ C = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}, \quad D = \begin{bmatrix} 7 & 8 \\ 9 & 10 \end{bmatrix}. $$

Matrix \(C\) is \(2 \times 3\), and matrix \(D\) is \(2 \times 2\).

To multiply \(CD\), the number of columns in \(C\) must equal the number of rows in \(D\). But \(C\) has 3 columns and \(D\) has 2 rows.

Since \(3 \ne 2\), the product \(CD\) is undefined.

This is a very common exam question: always check dimensions before starting any arithmetic.

8. Matrix multiplication is not commutative

For real numbers, multiplication is commutative because \(ab = ba\). For example, \(3 \times 5 = 5 \times 3\).

Matrix multiplication is different. In general,

$$ AB \ne BA. $$

Sometimes one product exists and the other does not. Even if both exist, they may give different answers.

Example 4: Showing that \(AB \ne BA\)

Let

$$ A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 3 & 0 \\ 4 & 1 \end{bmatrix}. $$

First find \(AB\).

Row 1, column 1:

$$1(3) + 2(4) = 3 + 8 = 11$$

Row 1, column 2:

$$1(0) + 2(1) = 2$$

Row 2, column 1:

$$0(3) + 1(4) = 4$$

Row 2, column 2:

$$0(0) + 1(1) = 1$$

So,

$$ AB = \begin{bmatrix} 11 & 2 \\ 4 & 1 \end{bmatrix}. $$

Now find \(BA\).

Row 1, column 1:

$$3(1) + 0(0) = 3$$

Row 1, column 2:

$$3(2) + 0(1) = 6$$

Row 2, column 1:

$$4(1) + 1(0) = 4$$

Row 2, column 2:

$$4(2) + 1(1) = 8 + 1 = 9$$

So,

$$ BA = \begin{bmatrix} 3 & 6 \\ 4 & 9 \end{bmatrix}. $$

Since

$$ \begin{bmatrix} 11 & 2 \\ 4 & 1 \end{bmatrix} \ne \begin{bmatrix} 3 & 6 \\ 4 & 9 \end{bmatrix}, $$

we have proved that

$$ AB \ne BA. $$

This shows that order matters in matrix multiplication.

9. Important patterns to remember

  • You multiply rows by columns, not rows by rows.
  • The number of columns in the first matrix must equal the number of rows in the second.
  • The result takes its size from the outside dimensions.
  • Even if both \(AB\) and \(BA\) exist, they are usually different.

10. Common mistakes

  • Forgetting to check dimensions first. Always do this before calculating.
  • Multiplying entries in the same position. That is not matrix multiplication.
  • Mixing up rows and columns. Each entry comes from one row of the first matrix and one column of the second.
  • Assuming \(AB = BA\). This is usually false.
  • Getting the size of the answer wrong. Use the outside dimensions.

11. Quick step-by-step guide

  1. Write the dimensions of both matrices.
  2. Check whether the inside numbers match.
  3. If they do not match, the product is undefined.
  4. If they do match, write the dimensions of the product using the outside numbers.
  5. Find each entry by dot product: row from the first matrix, column from the second.
  6. Simplify carefully.

12. Brief summary

Matrix multiplication combines two matrices by using dot products of rows and columns. The product \(AB\) is only defined when the number of columns in \(A\) equals the number of rows in \(B\), and the result has the outside dimensions.

To find each entry, multiply matching row and column entries and add. Most importantly, matrix multiplication is not commutative, so in general \(AB \ne BA\).

Put what you read to the test

You've worked through Matrix Multiplication. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.

Identity, Zero, and Transpose Matrices

Identity, Zero, and Transpose Matrices

Matrices are rectangular arrangements of numbers written in rows and columns. They are useful for organizing information and performing calculations in a structured way. In this lesson, you will learn about three important types of matrices: the identity matrix, the zero matrix, and the transpose of a matrix.

These ideas appear often in matrix algebra because they help us understand how matrices behave in addition and multiplication. They also help when solving systems and simplifying matrix expressions.

1. Reviewing matrix size

A matrix with 2 rows and 3 columns is called a (2 \times 3) matrix. In general, if a matrix has \(m\) rows and \(n\) columns, its size is written as \(m \times n\).

For example,

$$ A=\begin{bmatrix} 1 & 4 & 7 \\ 2 & 5 & 8 \end{bmatrix} $$

has 2 rows and 3 columns, so it is a \(2 \times 3\) matrix.

Knowing the size of a matrix is important because matrix operations depend on it. For example, matrices can only be added when they have the same size.

2. The zero matrix

A zero matrix is a matrix in which every entry is 0. It is usually written using the symbol \(O\) or sometimes just shown directly.

Examples of zero matrices are:

$$ \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}, \qquad \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} $$

A zero matrix can have different sizes. A \(2 \times 2\) zero matrix is different from a \(2 \times 3\) zero matrix because their dimensions are different.

Why the zero matrix matters:

  • It is the additive identity for matrices.
  • Adding a zero matrix to a matrix does not change the matrix.

If \(A\) is any matrix, then

$$ A + O = A $$

as long as \(O\) is the zero matrix of the same size as \(A\).

For example, if

$$ A=\begin{bmatrix} 3 & -1 \\ 5 & 2 \end{bmatrix} \quad \text{and} \quad O=\begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}, $$

then

$$ A+O= \begin{bmatrix} 3 & -1 \\ 5 & 2 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 3 & -1 \\ 5 & 2 \end{bmatrix} =A $$

The zero matrix also has an important multiplication property. If a zero matrix is multiplied by another matrix, the result is a zero matrix, provided the multiplication is defined.

For example,

$$ \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} $$

3. The identity matrix

An identity matrix is a square matrix with 1s on the main diagonal and 0s everywhere else. The main diagonal runs from the top left to the bottom right.

The identity matrix of size \(2 \times 2\) is

$$ I_2= \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} $$

The identity matrix of size \(3 \times 3\) is

$$ I_3= \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} $$

Only square matrices can be identity matrices. That means the number of rows must equal the number of columns.

Why the identity matrix matters:

  • It is the multiplicative identity for matrices.
  • Multiplying a matrix by the correct identity matrix does not change the matrix.

If \(A\) is a matrix, then

$$ AI = A \quad \text{and} \quad IA = A $$

as long as the dimensions match correctly.

This is similar to ordinary numbers, where multiplying by 1 does not change the number. The identity matrix plays the role of 1 in matrix multiplication.

For example, let

$$ A= \begin{bmatrix} 2 & 5 \\ -1 & 3 \end{bmatrix} $$

Then

$$ AI_2= \begin{bmatrix} 2 & 5 \\ -1 & 3 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 2 & 5 \\ -1 & 3 \end{bmatrix} $$

and

$$ I_2A= \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 5 \\ -1 & 3 \end{bmatrix} = \begin{bmatrix} 2 & 5 \\ -1 & 3 \end{bmatrix} $$

4. The transpose of a matrix

The transpose of a matrix is formed by switching its rows and columns. The transpose of matrix \(A\) is written as \(A^T\).

If a number is in row 1, column 2 of \(A\), then in \(A^T\) it moves to row 2, column 1.

For example, if

$$ A= \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} $$

then the transpose is

$$ A^T= \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix} $$

Notice what happened:

  • The first row \((1,2,3)\) became the first column.
  • The second row \((4,5,6)\) became the second column.
  • A \(2 \times 3\) matrix became a \(3 \times 2\) matrix.

Important transpose facts:

  • If \(A\) is \(m \times n\), then \(A^T\) is \(n \times m\).
  • Taking the transpose twice gives back the original matrix: \((A^T)^T = A\).
  • The transpose of a square matrix is still square.

5. Comparing the three ideas

  • Zero matrix: all entries are 0; it leaves a matrix unchanged under addition.
  • Identity matrix: 1s on the main diagonal and 0s elsewhere; it leaves a matrix unchanged under multiplication.
  • Transpose: not a special matrix type by itself, but an operation that flips rows into columns.

This difference is important. The zero and identity matrices are specific kinds of matrices. The transpose is something you do to a matrix.

Worked Example 1: Using the zero matrix

Find \(A + O\) if

$$ A= \begin{bmatrix} 7 & -3 \\ 4 & 1 \end{bmatrix}, \qquad O= \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} $$

Step 1: Add corresponding entries.

$$ A+O= \begin{bmatrix} 7+0 & -3+0 \\ 4+0 & 1+0 \end{bmatrix} $$

Step 2: Simplify.

$$ A+O= \begin{bmatrix} 7 & -3 \\ 4 & 1 \end{bmatrix} $$

Answer: Adding the zero matrix does not change the matrix.

Worked Example 2: Multiplying by the identity matrix

Find \(BI_2\) if

$$ B= \begin{bmatrix} 6 & 2 \\ -5 & 9 \end{bmatrix} $$

Step 1: Write the identity matrix.

$$ I_2= \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} $$

Step 2: Multiply.

$$ BI_2= \begin{bmatrix} 6 & 2 \\ -5 & 9 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} $$

Now calculate each entry:

$$ BI_2= \begin{bmatrix} 6(1)+2(0) & 6(0)+2(1) \\ -5(1)+9(0) & -5(0)+9(1) \end{bmatrix} = \begin{bmatrix} 6 & 2 \\ -5 & 9 \end{bmatrix} $$

Answer:

$$ BI_2=B $$

Worked Example 3: Finding a transpose

Find the transpose of

$$ C= \begin{bmatrix} 3 & 0 & -2 \\ 1 & 4 & 5 \end{bmatrix} $$

Step 1: Turn each row of \(C\) into a column.

  • First row: \((3,0,-2)\) becomes the first column.
  • Second row: \((1,4,5)\) becomes the second column.

Step 2: Write the new matrix.

$$ C^T= \begin{bmatrix} 3 & 1 \\ 0 & 4 \\ -2 & 5 \end{bmatrix} $$

Answer: The \(2 \times 3\) matrix became a \(3 \times 2\) matrix.

Worked Example 4: Combining ideas

Let

$$ D= \begin{bmatrix} 2 & 7 \\ 0 & -1 \end{bmatrix} $$

Find:

  1. \(D + O\)
  2. \(DI_2\)
  3. \(D^T\)

1. Add the zero matrix

$$ D+O= \begin{bmatrix} 2 & 7 \\ 0 & -1 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 2 & 7 \\ 0 & -1 \end{bmatrix} $$

2. Multiply by the identity matrix

$$ DI_2= \begin{bmatrix} 2 & 7 \\ 0 & -1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 2 & 7 \\ 0 & -1 \end{bmatrix} $$

3. Find the transpose

$$ D^T= \begin{bmatrix} 2 & 0 \\ 7 & -1 \end{bmatrix} $$

Notice: The zero and identity matrices leave \(D\) unchanged in their special operations, but the transpose changes its arrangement.

6. Common mistakes to avoid

  • Mixing up zero and identity matrices: the zero matrix has all 0s, but the identity matrix has 1s on the diagonal.
  • Using the wrong size identity matrix: if the dimensions do not match, the multiplication may not be defined.
  • Forgetting to switch rows and columns in a transpose: do not just rewrite the matrix; actually flip its layout.
  • Thinking transpose means reversing order: transpose is not a mirror from left to right; it is a row-column switch.

7. Quick check for understanding

Try these on your own:

  1. Write the \(3 \times 3\) zero matrix.
  2. Write the \(2 \times 2\) identity matrix.
  3. Find the transpose of $$\begin{bmatrix} 4 & 1 & 9 \end{bmatrix}.$$
  4. What happens when you add a zero matrix to any matrix of the same size?
  5. What happens when you multiply a matrix by the correct identity matrix?

Brief Summary

The zero matrix has all entries equal to 0 and acts like 0 in matrix addition. The identity matrix has 1s on the main diagonal and acts like 1 in matrix multiplication. The transpose of a matrix is found by switching rows and columns. Understanding these three ideas helps you work more confidently with matrix algebra.

Put what you read to the test

You've worked through Identity, Zero, and Transpose Matrices. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.

Determinants of 2x2 and 3x3 Matrices

Determinants of 2x2 and 3x3 Matrices

In matrix algebra, a determinant is a special number connected to a square matrix. It can tell us important things, such as whether a matrix has an inverse and whether a system of equations has a unique solution.

In this lesson, you will learn how to calculate determinants for 2x2 and 3x3 matrices. You will also learn how to use minors and cofactors when finding the determinant of a 3x3 matrix.

1. What is a determinant?

A determinant is defined only for a square matrix, which means the number of rows equals the number of columns. For a matrix \(A\), we write its determinant as \(\det(A)\) or sometimes \(|A|\).

For example, if

$$A = \begin{pmatrix} a & b \\ c & d \end{pmatrix},$$

then the determinant of \(A\) is

$$\det(A) = ad - bc.$$

This is the basic rule for a 2x2 determinant.

2. Determinant of a 2x2 matrix

For a 2x2 matrix

$$\begin{pmatrix} a & b \\ c & d \end{pmatrix},$$

the determinant is found by multiplying the numbers on the main diagonal and subtracting the product of the numbers on the other diagonal:

$$\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc.$$

You can remember this as:

  • first diagonal product: \(ad\)
  • second diagonal product: \(bc\)
  • subtract: \(ad - bc\)

Worked Example 1: Basic 2x2 determinant

Find the determinant of

$$\begin{pmatrix} 3 & 5 \\ 2 & 7 \end{pmatrix}.$$

Use the formula:

$$\det = (3)(7) - (5)(2).$$ $$= 21 - 10 = 11.$$

So, the determinant is 11.

Worked Example 2: 2x2 determinant with negatives

Find the determinant of

$$\begin{pmatrix} -4 & 6 \\ 3 & -2 \end{pmatrix}.$$

Apply the formula carefully:

$$\det = (-4)(-2) - (6)(3).$$ $$= 8 - 18 = -10.$$

So, the determinant is -10.

3. Determinant of a 3x3 matrix

A 3x3 determinant takes more work. For a matrix

$$A = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix},$$

we usually find the determinant by expansion by minors and cofactors.

This means we choose one row or one column and expand using the entries in that row or column. The first row is often the easiest place to start.

4. Minors and cofactors

To expand a 3x3 determinant, you need to understand minors and cofactors.

The minor of an entry is the determinant of the 2x2 matrix left after removing the row and column of that entry.

The cofactor is the minor with a sign attached. The signs follow this pattern:

$$\begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix}.$$

So the cofactor of an entry is:

  • the minor itself if the sign is positive
  • the negative of the minor if the sign is negative

If we expand along the first row, then

$$\det(A) = aC_{11} + bC_{12} + cC_{13},$$

where \(C_{11}, C_{12}, C_{13}\) are the cofactors of the entries in the first row.

Because of the sign pattern, this becomes

$$\det(A) = a\begin{vmatrix} e & f \\ h & i \end{vmatrix} - b\begin{vmatrix} d & f \\ g & i \end{vmatrix} + c\begin{vmatrix} d & e \\ g & h \end{vmatrix}.$$

Then each 2x2 determinant is found using \(ad-bc\).

5. Step-by-step method for a 3x3 determinant

  1. Choose a row or column to expand along.
  2. Write the correct sign pattern: \(+,-,+\) or \(-,+,-\), depending on position.
  3. For each entry, remove its row and column to make a 2x2 matrix.
  4. Find that 2x2 determinant.
  5. Multiply each entry by its cofactor.
  6. Add the results.

Worked Example 3: 3x3 determinant by expansion along the first row

Find the determinant of

$$\begin{pmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 5 & 2 & 1 \end{pmatrix}.$$

Expand along the first row. Use the sign pattern \(+,-,+\):

$$\det = 2\begin{vmatrix} -1 & 4 \\ 2 & 1 \end{vmatrix} - 1\begin{vmatrix} 0 & 4 \\ 5 & 1 \end{vmatrix} + 3\begin{vmatrix} 0 & -1 \\ 5 & 2 \end{vmatrix}.$$

Now find each 2x2 determinant.

First one:

$$\begin{vmatrix} -1 & 4 \\ 2 & 1 \end{vmatrix} = (-1)(1) - (4)(2) = -1 - 8 = -9.$$

Second one:

$$\begin{vmatrix} 0 & 4 \\ 5 & 1 \end{vmatrix} = (0)(1) - (4)(5) = 0 - 20 = -20.$$

Third one:

$$\begin{vmatrix} 0 & -1 \\ 5 & 2 \end{vmatrix} = (0)(2) - (-1)(5) = 0 + 5 = 5.$$

Substitute these back in:

$$\det = 2(-9) - 1(-20) + 3(5).$$ $$= -18 + 20 + 15 = 17.$$

So, the determinant is 17.

Worked Example 4: Choosing a helpful row or column

Find the determinant of

$$\begin{pmatrix} 1 & 0 & 2 \\ 3 & -1 & 4 \\ 0 & 5 & 6 \end{pmatrix}.$$

We can expand along the first row. This is a good choice because it contains a zero, which makes the work easier.

$$\det = 1\begin{vmatrix} -1 & 4 \\ 5 & 6 \end{vmatrix} - 0\begin{vmatrix} 3 & 4 \\ 0 & 6 \end{vmatrix} + 2\begin{vmatrix} 3 & -1 \\ 0 & 5 \end{vmatrix}.$$

Now calculate each 2x2 determinant.

$$\begin{vmatrix} -1 & 4 \\ 5 & 6 \end{vmatrix} = (-1)(6) - (4)(5) = -6 - 20 = -26.$$ $$\begin{vmatrix} 3 & -1 \\ 0 & 5 \end{vmatrix} = (3)(5) - (-1)(0) = 15 - 0 = 15.$$

Substitute:

$$\det = 1(-26) - 0(\text{anything}) + 2(15).$$ $$= -26 + 30 = 4.$$

So, the determinant is 4.

6. Why choosing the right row or column helps

You can expand along any row or any column, and you will get the same determinant. However, some choices are better than others.

It is usually smartest to choose:

  • a row or column with one or more zeros
  • a row or column with simpler numbers

This reduces the amount of calculation and lowers the chance of mistakes.

7. Common mistakes to avoid

  • Forgetting the sign pattern: for 3x3 determinants, the signs are not all positive.
  • Mixing up rows and columns: when finding a minor, remove the correct row and column.
  • Errors with negative numbers: always use brackets when multiplying negatives.
  • Using the wrong 2x2 formula: remember it is \(ad-bc\), not \(ad+bc\).
  • Arithmetic slips: check subtraction carefully.

8. Quick check: determinant equals zero

If the determinant of a square matrix is 0, that matrix is special. In later work, this often means the matrix does not have an inverse.

For example, for the 2x2 matrix

$$\begin{pmatrix} 2 & 4 \\ 1 & 2 \end{pmatrix},$$

the determinant is

$$2\cdot 2 - 4\cdot 1 = 4 - 4 = 0.$$

So this matrix has determinant zero.

9. Practice tips

  • For 2x2 matrices, memorize \(ad-bc\).
  • For 3x3 matrices, write the sign pattern before you start.
  • Circle or underline the row or column you are expanding along.
  • Work one minor at a time to stay organized.
  • Check your arithmetic at the end.

Summary

A determinant is a number found from a square matrix. For a 2x2 matrix, the determinant is found using the simple rule \(ad-bc\).

For a 3x3 matrix, the determinant is found by expansion using minors and cofactors. The key ideas are removing the correct row and column to form 2x2 determinants and using the correct sign pattern \(+,-,+\) and \(-,+,-\).

With practice, determinants become much easier. Start by mastering 2x2 matrices, then carefully apply the expansion steps to 3x3 matrices.

Put what you read to the test

You've worked through Determinants of 2x2 and 3x3 Matrices. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.

Inverse of a 2x2 Matrix

Inverse of a 2×2 Matrix

In matrix algebra, an inverse matrix works like a reciprocal for numbers. For example, the reciprocal of 5 is \(\frac{1}{5}\) because \(5 \cdot \frac{1}{5} = 1\). In the same way, if a matrix \(A\) has an inverse, then multiplying \(A\) by its inverse gives the identity matrix.

For a 2×2 matrix, the identity matrix is

$$I = \begin{pmatrix}1 & 0\\0 & 1\end{pmatrix}$$

If \(A^{-1}\) is the inverse of \(A\), then

$$AA^{-1} = A^{-1}A = I$$

This lesson will show you how to find the inverse of a 2×2 matrix, when an inverse exists, and how to check your answer.

1. The general form of a 2×2 matrix

A 2×2 matrix has 2 rows and 2 columns. We usually write it as

$$A = \begin{pmatrix}a & b\\c & d\end{pmatrix}$$

To find its inverse, we first need its determinant.

2. Determinant of a 2×2 matrix

The determinant of

$$A = \begin{pmatrix}a & b\\c & d\end{pmatrix}$$

is

$$\det(A) = ad - bc$$

This value is very important because it tells us whether the matrix has an inverse.

  • If \(ad - bc \neq 0\), then the matrix has an inverse.
  • If \(ad - bc = 0\), then the matrix does not have an inverse.

A matrix with determinant 0 is called a singular matrix.

A matrix with determinant not equal to 0 is called non-singular or invertible.

3. Formula for the inverse of a 2×2 matrix

If

$$A = \begin{pmatrix}a & b\\c & d\end{pmatrix}$$

and \(ad - bc \neq 0\), then

$$A^{-1} = \frac{1}{ad-bc}\begin{pmatrix}d & -b\\-c & a\end{pmatrix}$$

This formula has two main parts:

  1. Find the determinant \(ad-bc\).
  2. Form the matrix \(\begin{pmatrix}d & -b\\-c & a\end{pmatrix}\), which comes from swapping \(a\) and \(d\), and changing the signs of \(b\) and \(c\).

This new matrix is often called the adjoint for the 2×2 case in school mathematics.

4. Step-by-step method

To find the inverse of a 2×2 matrix:

  1. Write the matrix in the form \(\begin{pmatrix}a & b\\c & d\end{pmatrix}\).
  2. Calculate the determinant: \(ad-bc\).
  3. If the determinant is 0, stop. The matrix is singular and has no inverse.
  4. If the determinant is not 0, swap the diagonal entries \(a\) and \(d\).
  5. Change the signs of the other two entries \(b\) and \(c\).
  6. Multiply the new matrix by \(\frac{1}{ad-bc}\).

5. Worked Example 1: A simple inverse

Find the inverse of

$$A = \begin{pmatrix}2 & 1\\3 & 4\end{pmatrix}$$

Step 1: Find the determinant

$$\det(A) = (2)(4) - (1)(3) = 8 - 3 = 5$$

Since the determinant is 5, which is not 0, the inverse exists.

Step 2: Swap the diagonal entries and change the signs of the off-diagonal entries

$$\begin{pmatrix}2 & 1\\3 & 4\end{pmatrix} \rightarrow \begin{pmatrix}4 & -1\\-3 & 2\end{pmatrix}$$

Step 3: Multiply by \(\frac{1}{5}\)

$$A^{-1} = \frac{1}{5}\begin{pmatrix}4 & -1\\-3 & 2\end{pmatrix}$$

So the inverse is

$$A^{-1} = \begin{pmatrix}\frac{4}{5} & -\frac{1}{5}\\-\frac{3}{5} & \frac{2}{5}\end{pmatrix}$$

Checking the answer

We can check by multiplying \(A\) and \(A^{-1}\):

$$\begin{pmatrix}2 & 1\\3 & 4\end{pmatrix} \begin{pmatrix}\frac{4}{5} & -\frac{1}{5}\\-\frac{3}{5} & \frac{2}{5}\end{pmatrix}$$ $$= \begin{pmatrix} 2\left(\frac{4}{5}\right)+1\left(-\frac{3}{5}\right) & 2\left(-\frac{1}{5}\right)+1\left(\frac{2}{5}\right)\\ 3\left(\frac{4}{5}\right)+4\left(-\frac{3}{5}\right) & 3\left(-\frac{1}{5}\right)+4\left(\frac{2}{5}\right) \end{pmatrix}$$ $$= \begin{pmatrix} \frac{8}{5}-\frac{3}{5} & -\frac{2}{5}+\frac{2}{5}\\ \frac{12}{5}-\frac{12}{5} & -\frac{3}{5}+\frac{8}{5} \end{pmatrix} = \begin{pmatrix}1 & 0\\0 & 1\end{pmatrix}$$

So the answer is correct.

6. Worked Example 2: Inverse with a negative number

Find the inverse of

$$B = \begin{pmatrix}5 & -2\\1 & 3\end{pmatrix}$$

Step 1: Determinant

$$\det(B) = (5)(3) - (-2)(1) = 15 - (-2) = 17$$

Since \(17 \neq 0\), the inverse exists.

Step 2: Form the adjoint-style matrix

Swap 5 and 3, and change the signs of \(-2\) and 1:

$$\begin{pmatrix}5 & -2\\1 & 3\end{pmatrix} \rightarrow \begin{pmatrix}3 & 2\\-1 & 5\end{pmatrix}$$

Step 3: Multiply by \(\frac{1}{17}\)

$$B^{-1} = \frac{1}{17}\begin{pmatrix}3 & 2\\-1 & 5\end{pmatrix}$$

So

$$B^{-1} = \begin{pmatrix}\frac{3}{17} & \frac{2}{17}\\-\frac{1}{17} & \frac{5}{17}\end{pmatrix}$$

7. Worked Example 3: A singular matrix

Find the inverse of

$$C = \begin{pmatrix}2 & 4\\1 & 2\end{pmatrix}$$

Step 1: Determinant

$$\det(C) = (2)(2) - (4)(1) = 4 - 4 = 0$$

Since the determinant is 0, this matrix is singular.

Conclusion: \(C^{-1}\) does not exist.

This is an important result. Do not continue using the inverse formula if the determinant is 0, because division by 0 is not allowed.

8. Worked Example 4: Using the inverse carefully

Find the inverse of

$$D = \begin{pmatrix}4 & 7\\2 & 6\end{pmatrix}$$

Step 1: Determinant

$$\det(D) = (4)(6) - (7)(2) = 24 - 14 = 10$$

The inverse exists because the determinant is not 0.

Step 2: Swap the diagonal entries and change signs of the other two

$$\begin{pmatrix}4 & 7\\2 & 6\end{pmatrix} \rightarrow \begin{pmatrix}6 & -7\\-2 & 4\end{pmatrix}$$

Step 3: Multiply by \(\frac{1}{10}\)

$$D^{-1} = \frac{1}{10}\begin{pmatrix}6 & -7\\-2 & 4\end{pmatrix}$$

Simplify each entry if possible:

$$D^{-1} = \begin{pmatrix}\frac{3}{5} & -\frac{7}{10}\\-\frac{1}{5} & \frac{2}{5}\end{pmatrix}$$

9. Common mistakes to avoid

  • Forgetting the determinant: Always calculate \(ad-bc\) first.
  • Using the formula when the determinant is 0: A singular matrix has no inverse.
  • Changing the wrong entries: Only swap the diagonal entries \(a\) and \(d\). Then change the signs of \(b\) and \(c\).
  • Sign errors: Be especially careful when the matrix already contains negative numbers.
  • Forgetting to multiply the whole matrix by \(\frac{1}{ad-bc}\): The fraction applies to every entry.

10. Quick pattern to remember

For

$$\begin{pmatrix}a & b\\c & d\end{pmatrix}$$

the inverse is

$$\frac{1}{ad-bc}\begin{pmatrix}d & -b\\-c & a\end{pmatrix}$$

You can remember it as:

  • Swap the diagonal numbers.
  • Negate the off-diagonal numbers.
  • Divide by the determinant.

11. Why the determinant matters

The determinant measures whether the matrix can be reversed. If the determinant is 0, the matrix loses information in a way that cannot be undone, so no inverse exists.

For 11th Grade, the most important idea is simple: determinant 0 means no inverse.

12. Brief summary

An inverse matrix undoes the effect of a matrix, just like a reciprocal undoes multiplication by a number. For a 2×2 matrix

$$A = \begin{pmatrix}a & b\\c & d\end{pmatrix}$$

the determinant is \(ad-bc\). If this determinant is not zero, then

$$A^{-1} = \frac{1}{ad-bc}\begin{pmatrix}d & -b\\-c & a\end{pmatrix}$$

If \(ad-bc=0\), the matrix is singular and has no inverse. Always check the determinant first, then apply the formula carefully.

Put what you read to the test

You've worked through Inverse of a 2x2 Matrix. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.

Solving Linear Systems with Matrices

Solving Linear Systems with Matrices

In algebra, a system of linear equations is a set of equations with the same variables. For example, the system

$$ \begin{cases} 2x + y = 7 \\ x - 3y = -5 \end{cases} $$

has two equations and two variables.

One way to solve a system like this is by substitution or elimination. Another powerful method is to use matrices. Matrices help organize the numbers in a system and allow us to solve it in a structured way.

In this lesson, you will learn how to:

  • write a linear system in the form \(AX = B\),
  • identify the coefficient matrix, variable matrix, and constant matrix,
  • find the inverse of a \(2 \times 2\) matrix,
  • use \(X = A^{-1}B\) to solve a system.

1. Writing a system as a matrix equation

A system of two linear equations in two variables can be written in this form:

$$ AX = B $$

Here:

  • \(A\) is the coefficient matrix,
  • \(X\) is the variable matrix,
  • \(B\) is the constant matrix.

For the system

$$ \begin{cases} a x + b y = e \\ c x + d y = f \end{cases} $$

the matrix form is

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

This is just a compact way to write the same system.

2. Solving with the inverse matrix

If the matrix \(A\) has an inverse, we can solve

$$ AX = B $$

by multiplying both sides on the left by \(A^{-1}\):

$$ A^{-1}AX = A^{-1}B $$

Since \(A^{-1}A = I\), where \(I\) is the identity matrix, we get:

$$ IX = A^{-1}B $$ $$ X = A^{-1}B $$

So the main idea is:

$$ \boxed{X = A^{-1}B} $$

3. Finding the inverse of a \(2 \times 2\) matrix

For a matrix

$$ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} $$

the inverse is

$$ A^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} $$

But this only works if

$$ ad - bc \ne 0 $$

The value \(ad-bc\) is called the determinant of the matrix. If the determinant is 0, the matrix does not have an inverse, so this method cannot be used.

4. Steps for solving a \(2 \times 2\) system using matrices

  1. Write the system in the form \(AX = B\).
  2. Identify the coefficient matrix \(A\).
  3. Find \(A^{-1}\).
  4. Compute \(X = A^{-1}B\).
  5. Read the values of \(x\) and \(y\) from the matrix \(X\).

Worked Example 1: A basic system

Solve the system using matrices:

$$ \begin{cases} x + y = 5 \\ 2x - y = 1 \end{cases} $$

Step 1: Write in matrix form

$$ \begin{bmatrix} 1 & 1 \\ 2 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 5 \\ 1 \end{bmatrix} $$

So,

$$ A = \begin{bmatrix}1 & 1 \\ 2 & -1\end{bmatrix}, \quad X = \begin{bmatrix}x \\ y\end{bmatrix}, \quad B = \begin{bmatrix}5 \\ 1\end{bmatrix} $$

Step 2: Find the inverse of \(A\)

First find the determinant:

$$ (1)(-1) - (1)(2) = -1 - 2 = -3 $$

Since \(-3 \ne 0\), the inverse exists.

$$ A^{-1} = \frac{1}{-3} \begin{bmatrix} -1 & -1 \\ -2 & 1 \end{bmatrix} $$

Step 3: Multiply \(A^{-1}B\)

$$ X = A^{-1}B = \frac{1}{-3} \begin{bmatrix} -1 & -1 \\ -2 & 1 \end{bmatrix} \begin{bmatrix} 5 \\ 1 \end{bmatrix} $$ $$ = \frac{1}{-3} \begin{bmatrix} (-1)(5) + (-1)(1) \\ (-2)(5) + (1)(1) \end{bmatrix} = \frac{1}{-3} \begin{bmatrix} -6 \\ -9 \end{bmatrix} $$ $$ = \begin{bmatrix} 2 \\ 3 \end{bmatrix} $$

So the solution is

$$ \boxed{x = 2, \quad y = 3} $$

Worked Example 2: Coefficients other than 1

Solve the system:

$$ \begin{cases} 3x + 2y = 16 \\ x + 4y = 14 \end{cases} $$

Step 1: Write the matrix equation

$$ \begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 16 \\ 14 \end{bmatrix} $$

Step 2: Find the inverse

The determinant is

$$ (3)(4) - (2)(1) = 12 - 2 = 10 $$

So,

$$ A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -2 \\ -1 & 3 \end{bmatrix} $$

Step 3: Multiply

$$ X = A^{-1}B = \frac{1}{10} \begin{bmatrix} 4 & -2 \\ -1 & 3 \end{bmatrix} \begin{bmatrix} 16 \\ 14 \end{bmatrix} $$ $$ = \frac{1}{10} \begin{bmatrix} (4)(16) + (-2)(14) \\ (-1)(16) + (3)(14) \end{bmatrix} = \frac{1}{10} \begin{bmatrix} 64 - 28 \\ -16 + 42 \end{bmatrix} $$ $$ = \frac{1}{10} \begin{bmatrix} 36 \\ 26 \end{bmatrix} = \begin{bmatrix} \frac{18}{5} \\ \frac{13}{5} \end{bmatrix} $$

Therefore,

$$ \boxed{x = \frac{18}{5}, \quad y = \frac{13}{5}} $$

Worked Example 3: A system with a negative value

Solve the system:

$$ \begin{cases} 2x + 3y = 7 \\ 5x - y = 4 \end{cases} $$

Step 1: Matrix form

$$ \begin{bmatrix} 2 & 3 \\ 5 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 7 \\ 4 \end{bmatrix} $$

Step 2: Inverse of the coefficient matrix

The determinant is

$$ (2)(-1) - (3)(5) = -2 - 15 = -17 $$

So the inverse exists, and

$$ A^{-1} = \frac{1}{-17} \begin{bmatrix} -1 & -3 \\ -5 & 2 \end{bmatrix} $$

Step 3: Multiply by the constant matrix

$$ X = \frac{1}{-17} \begin{bmatrix} -1 & -3 \\ -5 & 2 \end{bmatrix} \begin{bmatrix} 7 \\ 4 \end{bmatrix} $$ $$ = \frac{1}{-17} \begin{bmatrix} (-1)(7) + (-3)(4) \\ (-5)(7) + (2)(4) \end{bmatrix} = \frac{1}{-17} \begin{bmatrix} -19 \\ -27 \end{bmatrix} $$ $$ = \begin{bmatrix} \frac{19}{17} \\ \frac{27}{17} \end{bmatrix} $$

So the solution is

$$ \boxed{x = \frac{19}{17}, \quad y = \frac{27}{17}} $$

What if the determinant is 0?

Consider the system

$$ \begin{cases} 2x + 4y = 6 \\ 1x + 2y = 3 \end{cases} $$

The coefficient matrix is

$$ A = \begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix} $$

Its determinant is

$$ (2)(2) - (4)(1) = 4 - 4 = 0 $$

Since the determinant is 0, \(A^{-1}\) does not exist. That means the inverse method cannot be used for this system.

This usually means the system has either:

  • no solution, or
  • more than one solution.

Common mistakes to avoid

  • Putting coefficients in the wrong order. The order of variables must stay consistent. If the equations use \(x\) then \(y\), every row in the coefficient matrix must follow that same order.
  • Forgetting negative signs. Be very careful when copying coefficients and when using the inverse formula.
  • Using the inverse formula incorrectly. For \(\begin{bmatrix}a & b \\ c & d\end{bmatrix}\), the inverse uses \(\begin{bmatrix}d & -b \\ -c & a\end{bmatrix}\). The diagonal entries switch places, and the other two change signs.
  • Not checking the determinant. If \(ad-bc=0\), the matrix has no inverse.
  • Multiplying matrices incorrectly. Multiply each row of the first matrix by each column of the second matrix.

Quick check: Why does this method work?

It works because matrix multiplication can represent a system of equations. The matrix \(A\) contains the coefficients, and multiplying by \(A^{-1}\) “undoes” the effect of \(A\), just like dividing both sides of an equation by a number.

For a regular equation such as \(3x = 12\), you solve by multiplying by \(\frac{1}{3}\). For a matrix equation \(AX = B\), you solve by multiplying by \(A^{-1}\).

Practice idea

When you solve a system with matrices, always do a quick check by substituting your answers back into the original equations. This helps catch arithmetic mistakes.

For example, in Worked Example 1, we found \(x=2\) and \(y=3\). Check:

$$ x + y = 2 + 3 = 5 $$ $$ 2x - y = 2(2) - 3 = 4 - 3 = 1 $$

Both equations are true, so the solution is correct.

Summary

To solve a \(2 \times 2\) system with matrices, write the system as \(AX=B\). Then find the inverse of the coefficient matrix \(A\), as long as its determinant is not 0. Finally, multiply to get \(X=A^{-1}B\), which gives the values of \(x\) and \(y\).

This method is especially useful because it is organized and connects algebra to matrix operations. Once you are comfortable with writing systems in matrix form and finding inverses, solving systems becomes a clear step-by-step process.

Put what you read to the test

You've worked through Solving Linear Systems with Matrices. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.

Geometric Transformations with Matrices

Geometric Transformations with Matrices

In coordinate geometry, points can be moved, flipped, turned, or stretched. These changes are called transformations. In matrix algebra, we can perform many of these transformations by multiplying a transformation matrix by a column vector that represents a point.

This is a powerful idea because one matrix can transform many points in the same way. Instead of working out each move by drawing and counting, we can use matrix multiplication to get exact coordinates.

In this lesson, you will learn how to represent points as column vectors, how to apply a 2 by 2 matrix to a point, and how to recognize common transformations such as reflections, rotations, and dilations.

1. Representing a point as a column vector

A point \\( (x, y) \\) on the coordinate plane can be written as the column vector

$$ \begin{bmatrix} x \\ y \end{bmatrix} $$

For example:

  • The point \\( (3, 2) \\) becomes \\( \begin{bmatrix} 3 \\ 2 \end{bmatrix} \\)
  • The point \\( (-1, 4) \\) becomes \\( \begin{bmatrix} -1 \\ 4 \end{bmatrix} \\)

This vector tells us the horizontal position and vertical position of the point.

2. Using a matrix to transform a point

A 2 by 2 matrix has the form

$$ \begin{bmatrix} a & b \\ c & d \end{bmatrix} $$

To transform a point, multiply the matrix by the point's column vector:

$$ \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix} $$

This gives the coordinates of the image, which is the transformed point.

So if a point \\( (x, y) \\) is transformed, its new coordinates are found by multiplying the matrix by the column vector.

3. Common transformation matrices

Some matrices represent standard geometric transformations. These are important to recognize.

A. Reflection in the x-axis

A reflection in the x-axis keeps the x-coordinate the same and changes the sign of the y-coordinate:

$$ (x, y) \to (x, -y) $$

The matrix is

$$ \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} $$

B. Reflection in the y-axis

A reflection in the y-axis changes the sign of the x-coordinate and keeps the y-coordinate the same:

$$ (x, y) \to (-x, y) $$

The matrix is

$$ \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix} $$

C. Reflection in the line \\( y = x \\)

This swaps the coordinates:

$$ (x, y) \to (y, x) $$

The matrix is

$$ \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} $$

D. Rotation \\(90^\circ\\) anticlockwise about the origin

This turns every point a quarter turn anticlockwise:

$$ (x, y) \to (-y, x) $$

The matrix is

$$ \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} $$

E. Rotation \\(90^\circ\\) clockwise about the origin

This turns every point a quarter turn clockwise:

$$ (x, y) \to (y, -x) $$

The matrix is

$$ \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} $$

F. Rotation \\(180^\circ\\) about the origin

This changes both signs:

$$ (x, y) \to (-x, -y) $$

The matrix is

$$ \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix} $$

G. Dilation from the origin

A dilation changes the size of a shape. A scale factor \\(k\\) multiplies both coordinates by \\(k\\):

$$ (x, y) \to (kx, ky) $$

The matrix is

$$ \begin{bmatrix} k & 0 \\ 0 & k \end{bmatrix} $$

If \\(k > 1\\), the image is enlarged. If \\(0 < k < 1\\), the image is reduced.

4. Why matrix multiplication works

The matrix tells us how the x-coordinate and y-coordinate combine to make the new point. Each row creates one new coordinate.

For example, in

$$ \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix} $$

the first row gives the new x-coordinate, and the second row gives the new y-coordinate.

This is why it is important to multiply correctly and keep the order of the entries clear.

Worked Example 1: Reflecting a single point in the x-axis

Find the image of the point \\( (4, -3) \\) under reflection in the x-axis.

Step 1: Write the transformation matrix

$$ \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} $$

Step 2: Write the point as a column vector

$$ \begin{bmatrix} 4 \\ -3 \end{bmatrix} $$

Step 3: Multiply

$$ \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \begin{bmatrix} 4 \\ -3 \end{bmatrix} = \begin{bmatrix} 1(4) + 0(-3) \\ 0(4) + (-1)(-3) \end{bmatrix} = \begin{bmatrix} 4 \\ 3 \end{bmatrix} $$

Answer: The image is \\( (4, 3) \\).

This makes sense because reflecting in the x-axis changes the sign of the y-coordinate only.

Worked Example 2: Rotating a point \\(90^\circ\\) anticlockwise

Find the image of \\( (2, 5) \\) after a \\(90^\circ\\) anticlockwise rotation about the origin.

Step 1: Use the correct matrix

$$ \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} $$

Step 2: Multiply by the column vector

$$ \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 2 \\ 5 \end{bmatrix} = \begin{bmatrix} 0(2) + (-1)(5) \\ 1(2) + 0(5) \end{bmatrix} = \begin{bmatrix} -5 \\ 2 \end{bmatrix} $$

Answer: The image is \\( (-5, 2) \\).

You can also remember this rule as \\( (x, y) \to (-y, x) \\).

Worked Example 3: Dilation of a triangle

A triangle has vertices \\( A(1, 2) \\), \\( B(3, 1) \\), and \\( C(-2, 4) \\). It is enlarged by scale factor 2 from the origin. Find the image of each vertex.

Step 1: Write the dilation matrix

$$ \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} $$

Step 2: Transform each point

For \\( A(1, 2) \\):

$$ \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 4 \end{bmatrix} $$

So \\( A'(2, 4) \\).

For \\( B(3, 1) \\):

$$ \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \begin{bmatrix} 3 \\ 1 \end{bmatrix} = \begin{bmatrix} 6 \\ 2 \end{bmatrix} $$

So \\( B'(6, 2) \\).

For \\( C(-2, 4) \\):

$$ \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \begin{bmatrix} -2 \\ 4 \end{bmatrix} = \begin{bmatrix} -4 \\ 8 \end{bmatrix} $$

So \\( C'(-4, 8) \\).

Answer: The image of the triangle has vertices \\( A'(2, 4) \\), \\( B'(6, 2) \\), and \\( C'(-4, 8) \\).

Worked Example 4: Identifying a transformation from its matrix

Describe the transformation represented by

$$ \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} $$

Step 1: Apply it to a general point

$$ \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} y \\ x \end{bmatrix} $$

This changes \\( (x, y) \\) into \\( (y, x) \\).

Step 2: Interpret the result

Swapping the coordinates means reflection in the line \\( y = x \\).

Answer: The matrix represents a reflection in the line \\( y = x \\).

5. Transforming a whole shape

To transform a shape, apply the matrix to every vertex. Then plot the new points and join them in the same order.

For example, if a square has four vertices, you multiply the transformation matrix by each of the four column vectors.

This works because a matrix transformation moves every point in the plane according to the same rule.

6. Important patterns to remember

  • Reflection in the x-axis: \\( (x, y) \to (x, -y) \\)
  • Reflection in the y-axis: \\( (x, y) \to (-x, y) \\)
  • Reflection in \\( y = x \\): \\( (x, y) \to (y, x) \\)
  • Rotation \\(90^\circ\\) anticlockwise: \\( (x, y) \to (-y, x) \\)
  • Rotation \\(90^\circ\\) clockwise: \\( (x, y) \to (y, -x) \\)
  • Rotation \\(180^\circ\\): \\( (x, y) \to (-x, -y) \\)
  • Dilation by scale factor \\(k\\): \\( (x, y) \to (kx, ky) \\)

7. Common mistakes and how to avoid them

  • Mixing up the order of coordinates: Always write points as \\( \begin{bmatrix} x \\ y \end{bmatrix} \\), not \\( \begin{bmatrix} y \\ x \end{bmatrix} \\).
  • Using the wrong matrix: Check whether the question asks for reflection, rotation, or dilation.
  • Making sign errors: Negative signs are very important in reflections and rotations.
  • Multiplying in the wrong way: Use row-by-column multiplication carefully.

8. Quick check for understanding

Try these mentally or on paper:

  1. What matrix reflects a point in the y-axis?
  2. What is the image of \\( (3, -1) \\) under a \\(180^\circ\\) rotation?
  3. What happens to \\( (x, y) \\) under the matrix \\( \begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix} \\)?

Answers:

  1. \\( \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix} \\)
  2. \\( (-3, 1) \\)
  3. A dilation from the origin with scale factor 3

Summary

Geometric transformations can be represented neatly using matrices. A point is written as a column vector, and multiplying by a 2 by 2 matrix gives the transformed point.

Different matrices produce different transformations, including reflections, rotations, and dilations. Once you know the common transformation matrices and how to multiply correctly, you can transform single points or entire shapes with confidence.

Put what you read to the test

You've worked through Geometric Transformations with Matrices. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.