Chapter 4

Linear Systems and Matrix Algebra

Linear Forms and Multivariable Equations

Linear Forms and Multivariable Equations help us describe relationships between several quantities at once. In 12th Grade Maths, this idea connects algebra, graphs, systems of equations, and matrix methods. A linear model in two or more variables is one of the simplest and most useful ways to represent real situations.

In this lesson, you will learn what a linear form is, how to write multivariable linear equations, how to interpret coefficients, slopes, and intercepts, and how these equations represent lines, planes, and higher-dimensional flat surfaces called hyperplanes.

1. What is a linear form?

A linear form is an expression made by adding constant multiples of variables. It has no powers greater than 1, no products of variables, and no variables in denominators or roots.

Examples of linear forms are:

  • \(3x + 2y\)
  • \(-4x + 5y - z\)
  • \(7a - 2b + 9c\)

These are not linear forms:

  • \(x^2 + y\) because of the square
  • \(xy + 3\) because variables are multiplied together
  • \(\frac{1}{x} + y\) because a variable is in the denominator

In general, a linear form in variables \(x_1, x_2, \dots, x_n\) looks like

$$a_1x_1 + a_2x_2 + \cdots + a_nx_n$$

where \(a_1, a_2, \dots, a_n\) are constants.

2. From a linear form to a linear equation

When we set a linear form equal to a constant, we get a linear equation.

For example:

  • \(2x + 3y = 12\)
  • \(x - 4y + 2z = 7\)
  • \(5a + b - 3c = 10\)

A linear equation in:

  • two variables usually represents a line,
  • three variables usually represents a plane,
  • more than three variables represents a hyperplane.

A hyperplane is the higher-dimensional version of a line or plane. You may not be able to draw it easily, but algebraically it behaves in a similar way: it is still flat and still described by a linear equation.

3. General form of a multivariable linear equation

A linear equation in several variables can be written as

$$a_1x_1 + a_2x_2 + \cdots + a_nx_n = b$$

Here:

  • the variables are \(x_1, x_2, \dots, x_n\),
  • the constants \(a_1, a_2, \dots, a_n\) are called coefficients,
  • \(b\) is a constant term.

The coefficients tell us how much each variable contributes to the equation. They also help determine the direction or tilt of the line, plane, or hyperplane.

4. Linear models in two variables

In two variables, the most familiar linear equation is

$$ax + by = c$$

If \(b \ne 0\), we can rewrite it in slope-intercept form:

$$y = mx + b$$

To avoid confusion, note that the letter \(b\) is often used in two different ways in algebra:

  • in \(ax + by = c\), \(b\) is a coefficient,
  • in \(y = mx + b\), \(b\) is the y-intercept.

In slope-intercept form:

  • \(m\) is the slope, which tells how much \(y\) changes when \(x\) increases by 1,
  • the intercept is the value of \(y\) when \(x=0\).

For example, in

$$y = 2x + 3$$

the slope is \(2\), so every increase of 1 in \(x\) causes \(y\) to increase by 2. The y-intercept is \(3\), so the line crosses the y-axis at \((0,3)\).

5. Intercepts in two variables

For the equation \(ax + by = c\):

  • the x-intercept is found by setting \(y=0\),
  • the y-intercept is found by setting \(x=0\).

These intercepts are useful because they give easy points to graph a line and help interpret the model.

For example, for

$$2x + 3y = 12$$
  • if \(y=0\), then \(2x=12\), so \(x=6\), giving x-intercept \((6,0)\),
  • if \(x=0\), then \(3y=12\), so \(y=4\), giving y-intercept \((0,4)\).

6. Linear models in three variables

In three variables, an equation such as

$$2x + y - z = 5$$

usually represents a plane in 3-dimensional space.

Unlike a line in two dimensions, a plane extends in two independent directions. There is no single slope value like in \(y=mx+b\), but the coefficients still tell us how the plane is oriented.

We can find intercepts in 3D the same way:

  • the x-intercept occurs when \(y=0\) and \(z=0\),
  • the y-intercept occurs when \(x=0\) and \(z=0\),
  • the z-intercept occurs when \(x=0\) and \(y=0\).

For \(2x + y - z = 5\):

  • x-intercept: set \(y=0\), \(z=0\), then \(2x=5\), so \(x=\frac{5}{2}\)
  • y-intercept: set \(x=0\), \(z=0\), then \(y=5\)
  • z-intercept: set \(x=0\), \(y=0\), then \(-z=5\), so \(z=-5\)

So the intercept points are

$$\left(\frac{5}{2},0,0\right), \quad (0,5,0), \quad (0,0,-5)$$

7. Hyperplanes in more than three variables

When there are four or more variables, a linear equation still defines a flat set of solutions. This is called a hyperplane.

For example,

$$x_1 + 2x_2 - x_3 + 3x_4 = 7$$

is a linear equation in four variables. We cannot graph it in ordinary space, but we can still interpret it as a linear relationship among the variables.

Each solution is an ordered set \((x_1, x_2, x_3, x_4)\) that makes the equation true. Changing one variable usually requires changing another to stay on the same hyperplane.

8. How to interpret coefficients in multivariable models

In a linear model, each coefficient shows how one variable affects the output when the others are held fixed.

Suppose a model is

$$C = 50x + 30y + 20z$$

If \(x\), \(y\), and \(z\) represent quantities of three products, then:

  • each 1-unit increase in \(x\) increases \(C\) by 50,
  • each 1-unit increase in \(y\) increases \(C\) by 30,
  • each 1-unit increase in \(z\) increases \(C\) by 20.

This is similar to slope in two variables, but now there are several rates of change, one for each variable.

9. Standard form and matrix connection

Because this topic appears inside linear systems and matrix algebra, it is useful to connect linear equations to matrices.

A linear equation such as

$$2x - 3y + z = 4$$

has coefficient row \((2, -3, 1)\). If we have several such equations together, we can organize their coefficients into a matrix.

For example, the system

$$\begin{aligned} 2x + y &= 5 \\ - x + 3y &= 4 \end{aligned}$$

has coefficient matrix

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

This lesson focuses on writing and interpreting each linear equation, but this matrix form is what allows larger systems to be solved efficiently.

10. Worked Example 1: Writing a linear model in two variables

Problem: A taxi fare has a fixed starting fee of \(\$4\) and then costs \(\$2.50\) per mile. Write a linear model for the total cost \(C\) after \(m\) miles, and interpret the slope and intercept.

Step 1: Identify the fixed amount.

The starting fee is \(4\), so this is the intercept.

Step 2: Identify the rate of change.

The fare increases by \(2.50\) for each mile, so the slope is \(2.50\).

Step 3: Write the equation.

$$C = 2.50m + 4$$

Interpretation:

  • The slope \(2.50\) means the cost increases by \(\$2.50\) per mile.
  • The intercept \(4\) means the cost is \(\$4\) even before any miles are traveled.

11. Worked Example 2: Finding intercepts of a line

Problem: Find the x-intercept and y-intercept of

$$3x + 2y = 12$$

Step 1: Find the x-intercept.

Set \(y=0\):

$$3x + 2(0) = 12$$ $$3x = 12$$ $$x = 4$$

So the x-intercept is \((4,0)\).

Step 2: Find the y-intercept.

Set \(x=0\):

$$3(0) + 2y = 12$$ $$2y = 12$$ $$y = 6$$

So the y-intercept is \((0,6)\).

Step 3: Write in slope-intercept form if needed.

$$3x + 2y = 12$$ $$2y = -3x + 12$$ $$y = -\frac{3}{2}x + 6$$

The slope is \(-\frac{3}{2}\), which means when \(x\) increases by 1, \(y\) decreases by \(1.5\).

12. Worked Example 3: Interpreting a plane in three variables

Problem: For the equation

$$x + 2y + 3z = 6$$

find the x-, y-, and z-intercepts.

Step 1: x-intercept.

Set \(y=0\) and \(z=0\):

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

x-intercept: \((6,0,0)\)

Step 2: y-intercept.

Set \(x=0\) and \(z=0\):

$$0 + 2y + 0 = 6$$ $$2y = 6$$ $$y = 3$$

y-intercept: \((0,3,0)\)

Step 3: z-intercept.

Set \(x=0\) and \(y=0\):

$$0 + 0 + 3z = 6$$ $$3z = 6$$ $$z = 2$$

z-intercept: \((0,0,2)\)

Interpretation: These three points lie on the plane and help describe where it crosses the coordinate axes.

13. Worked Example 4: Writing and interpreting a model with three variables

Problem: A school fundraiser sells sandwiches for \(\$5\), drinks for \(\$2\), and snacks for \(\$3\). Write a linear model for total sales \(S\) in terms of the number of sandwiches \(x\), drinks \(y\), and snacks \(z\). Then interpret the coefficients.

Step 1: Multiply each item count by its price.

  • Sandwiches: \(5x\)
  • Drinks: \(2y\)
  • Snacks: \(3z\)

Step 2: Add the amounts.

$$S = 5x + 2y + 3z$$

Interpretation:

  • The coefficient \(5\) means each additional sandwich adds \(\$5\) to total sales.
  • The coefficient \(2\) means each additional drink adds \(\$2\).
  • The coefficient \(3\) means each additional snack adds \(\$3\).

If the fundraiser makes \(\$41\), then the item counts must satisfy

$$5x + 2y + 3z = 41$$

This equation describes all combinations of sandwiches, drinks, and snacks that produce \(\$41\) in sales.

14. Common mistakes to avoid

  • Including nonlinear terms: Expressions like \(x^2\), \(xy\), or \(\frac{1}{x}\) are not linear.
  • Mixing up coefficient and intercept: In \(y = mx + b\), \(m\) is slope and \(b\) is y-intercept.
  • Finding intercepts incorrectly in 3D: To find one intercept, set all the other variables equal to 0.
  • Assuming one slope works in all dimensions: In more than two variables, we usually interpret coefficients instead of a single slope.

15. Key ideas to remember

  • A linear form is a sum of constants times variables.
  • A linear equation is formed by setting a linear form equal to a constant.
  • In two variables, linear equations represent lines.
  • In three variables, linear equations represent planes.
  • In more variables, they represent hyperplanes.
  • Coefficients describe how variables affect the equation or model.
  • Intercepts show where the graph crosses coordinate axes.

Brief Summary

Linear forms and multivariable equations are the building blocks of linear systems and matrix algebra. They let us model relationships among two or more variables using equations of the form

$$a_1x_1 + a_2x_2 + \cdots + a_nx_n = b$$

In two variables, these equations represent lines with slopes and intercepts. In three variables, they represent planes, and in higher dimensions, hyperplanes. Understanding how to write these equations and interpret their coefficients and intercepts is an important step toward solving larger systems and using matrices effectively.

Put what you read to the test

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

Systems of Linear Equations

Systems of Linear Equations are used when we want to find values that satisfy two or more linear equations at the same time. In 12th Grade Maths, this is an important skill because many real-world situations involve multiple conditions that must all be true together.

A linear equation in two variables has the form \(ax + by = c\), where \(a\), \(b\), and \(c\) are constants. A system of linear equations is a set of two or more such equations. The solution to the system is the value or values of the variables that make every equation in the system true.

For example, in the system

$$ \begin{aligned} 2x + y &= 7 \\ x - y &= 2 \end{aligned} $$

we are looking for one pair \((x, y)\) that satisfies both equations.

There are three main methods you need to know for solving systems of linear equations:

  • Graphing
  • Substitution
  • Elimination

For systems with three variables, graphing is usually not practical, so substitution and elimination are the main methods used.

1. Understanding what a solution means

In a system of two linear equations, each equation represents a line on a graph. The solution to the system is the point where the two lines intersect.

There are three possible outcomes:

  • One solution: The lines cross at one point.
  • No solution: The lines are parallel and never meet.
  • Infinitely many solutions: The two equations represent the same line.

For example:

  • \(y = 2x + 1\) and \(y = -x + 4\) have one solution.
  • \(y = 3x + 2\) and \(y = 3x - 5\) have no solution because they have the same slope but different intercepts.
  • \(2x + 4y = 6\) and \(x + 2y = 3\) have infinitely many solutions because one equation is just a multiple of the other.

2. Solving by graphing

Graphing helps us understand what a system means visually. To solve by graphing:

  1. Rewrite each equation in slope-intercept form if possible: \(y = mx + b\).
  2. Graph both lines on the same coordinate plane.
  3. Find the point where they intersect.

This method is best when the intersection point is easy to see. However, if the lines meet at a point with decimal or fractional coordinates, graphing may not give an exact answer.

Worked Example 1: Solve a system by graphing

Solve:

$$ \begin{aligned} y &= x + 1 \\ y &= -x + 5 \end{aligned} $$

These equations are already in slope-intercept form.

  • The first line has slope \(1\) and y-intercept \(1\).
  • The second line has slope \(-1\) and y-intercept \(5\).

If you graph them, they intersect at \((2, 3)\).

Check:

$$ y = x + 1 = 2 + 1 = 3$$ $$ y = -x + 5 = -2 + 5 = 3$$

So the solution is

$$ (x, y) = (2, 3) $$

3. Solving by substitution

The substitution method works well when one equation is already solved for one variable, or can easily be rearranged. The idea is simple:

  1. Solve one equation for one variable.
  2. Substitute that expression into the other equation.
  3. Solve for the remaining variable.
  4. Substitute back to find the other variable.

Worked Example 2: Solve a 2-variable system by substitution

Solve:

$$ \begin{aligned} x + y &= 10 \\ 2x - y &= 2 \end{aligned} $$

Step 1: Solve the first equation for \(y\).

$$ y = 10 - x$$

Step 2: Substitute into the second equation.

$$ 2x - (10 - x) = 2 $$

Simplify:

$$ 2x - 10 + x = 2 $$ $$ 3x - 10 = 2 $$ $$ 3x = 12 $$ $$ x = 4 $$

Step 3: Substitute \(x = 4\) into \(y = 10 - x\).

$$ y = 10 - 4 = 6$$

So the solution is

$$ (x, y) = (4, 6) $$

Check in the second equation:

$$ 2(4) - 6 = 8 - 6 = 2 $$

The solution is correct.

4. Solving by elimination

The elimination method is often the fastest method, especially when the coefficients of one variable are already opposites or can easily be made opposites.

The idea is to add or subtract the equations so that one variable disappears. Then solve for the remaining variable.

Steps for elimination:

  1. Write the equations in standard form if needed: \(ax + by = c\).
  2. Make the coefficients of one variable opposites.
  3. Add or subtract the equations.
  4. Solve for one variable.
  5. Substitute back to find the other variable.

Worked Example 3: Solve a 2-variable system by elimination

Solve:

$$ \begin{aligned} 3x + 2y &= 16 \\ 3x - 2y &= 8 \end{aligned} $$

The coefficients of \(y\) are opposites: \(2\) and \(-2\). Add the equations:

$$ (3x + 2y) + (3x - 2y) = 16 + 8 $$ $$ 6x = 24 $$ $$ x = 4 $$

Now substitute \(x = 4\) into one of the original equations:

$$ 3x + 2y = 16 $$ $$ 3(4) + 2y = 16 $$ $$ 12 + 2y = 16 $$ $$ 2y = 4 $$ $$ y = 2 $$

So the solution is

$$ (x, y) = (4, 2) $$

5. Systems with no solution or infinitely many solutions

When solving algebraically, you may end up with a statement that tells you about the type of system.

No solution: If the variables disappear and you get a false statement, such as

$$ 0 = 5 $$

then the system is inconsistent and has no solution.

Infinitely many solutions: If the variables disappear and you get a true statement, such as

$$ 0 = 0 $$

then the equations represent the same line, so there are infinitely many solutions.

Example of no solution:

$$ \begin{aligned} x + y &= 4 \\ 2x + 2y &= 10 \end{aligned} $$

If the first equation is multiplied by 2, we get

$$ 2x + 2y = 8 $$

but the second equation says

$$ 2x + 2y = 10 $$

This is impossible, so there is no solution.

Example of infinitely many solutions:

$$ \begin{aligned} x + y &= 4 \\ 2x + 2y &= 8 \end{aligned} $$

Here the second equation is exactly twice the first, so both equations describe the same line.

6. Solving systems of three linear equations

A system of three linear equations usually has three variables, such as \(x\), \(y\), and \(z\). A solution is an ordered triple \((x, y, z)\) that satisfies all three equations.

The main methods are still substitution and elimination. The goal is to reduce the system step by step until only one variable remains.

A useful plan is:

  1. Use two pairs of equations to eliminate the same variable.
  2. This gives you two new equations with only two variables.
  3. Solve that smaller 2-variable system.
  4. Substitute back to find the third variable.

Worked Example 4: Solve a 3-variable system by elimination

Solve:

$$ \begin{aligned} x + y + z &= 6 \\ 2x - y + z &= 3 \\ x + 2y - z &= 3 \end{aligned} $$

We will eliminate \(z\) first.

Use Equation 1 and Equation 2:

$$ \begin{aligned} x + y + z &= 6 \\ 2x - y + z &= 3 \end{aligned} $$

Subtract Equation 1 from Equation 2:

$$ (2x - y + z) - (x + y + z) = 3 - 6 $$ $$ x - 2y = -3 $$

This is our first new equation:

$$ x - 2y = -3 $$

Now use Equation 1 and Equation 3:

$$ \begin{aligned} x + y + z &= 6 \\ x + 2y - z &= 3 \end{aligned} $$

Add the equations to eliminate \(z\):

$$ (x + y + z) + (x + 2y - z) = 6 + 3 $$ $$ 2x + 3y = 9 $$

Now we have a 2-variable system:

$$ \begin{aligned} x - 2y &= -3 \\ 2x + 3y &= 9 \end{aligned} $$

Solve the first equation for \(x\):

$$ x = 2y - 3$$

Substitute into the second equation:

$$ 2(2y - 3) + 3y = 9 $$ $$ 4y - 6 + 3y = 9 $$ $$ 7y - 6 = 9 $$ $$ 7y = 15 $$ $$ y = \frac{15}{7} $$

Now find \(x\):

$$ x = 2\left(\frac{15}{7}\right) - 3 = \frac{30}{7} - \frac{21}{7} = \frac{9}{7}$$

Now substitute \(x\) and \(y\) into Equation 1:

$$ \frac{9}{7} + \frac{15}{7} + z = 6 $$ $$ \frac{24}{7} + z = 6 $$ $$ z = 6 - \frac{24}{7} = \frac{42}{7} - \frac{24}{7} = \frac{18}{7} $$

So the solution is

$$ \left(\frac{9}{7}, \frac{15}{7}, \frac{18}{7}\right) $$

7. Choosing the best method

Different systems are easier with different methods.

  • Use graphing when you want a visual understanding or when the lines clearly intersect at integer coordinates.
  • Use substitution when one variable is already isolated or easy to isolate.
  • Use elimination when coefficients are opposites or can easily be made opposites.

For 3-variable systems, elimination is usually the most efficient method.

8. Common mistakes to avoid

  • Sign errors: Be careful when distributing negatives, such as in \(-(a+b) = -a-b\).
  • Using only one equation: A solution must satisfy all equations in the system.
  • Stopping too early: After finding one variable, substitute back to find the others.
  • Graphing inaccurately: A rough graph may suggest the wrong intersection point.
  • Forgetting to check: Always substitute your answer back into the original equations.

9. Why systems of linear equations matter

Systems of linear equations can model many situations, such as:

  • finding the price of different items from total costs,
  • comparing plans or rates,
  • solving mixture problems,
  • analyzing relationships between several quantities at once.

They are also an important foundation for matrix algebra and more advanced mathematical models.

Summary

A system of linear equations is a group of equations solved together. In two variables, the solution is the point where the lines intersect. You can solve systems by graphing, substitution, or elimination.

Some systems have one solution, some have no solution, and some have infinitely many solutions. For three variables, the main idea is to eliminate one variable at a time until the system becomes easier to solve.

The key to success is to work carefully, keep track of signs, and always check your final answer in the original equations.

Put what you read to the test

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

Matrix Anatomy and Operations

Matrix Anatomy and Operations

Matrices are rectangular arrangements of numbers that help us organize information and perform calculations efficiently. In 12th Grade Maths, matrices are especially useful for representing linear systems, storing data, and modeling relationships between quantities.

This lesson will teach you how to read a matrix, describe its size, identify its parts, and perform the most important basic operations: addition, scalar multiplication, and matrix multiplication.

Understanding these operations is important because matrix work follows clear rules. If you know the structure of a matrix and check dimensions carefully, you can avoid many common mistakes.

1. What is a matrix?

A matrix is a rectangular array of numbers arranged in rows and columns. A matrix is usually named with a capital letter, such as \(A\), \(B\), or \(M\).

For example,

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

This matrix has:

  • 2 rows
  • 3 columns

So we say its dimensions or order are \(2 \times 3\).

In general, a matrix with \(m\) rows and \(n\) columns is called an \(m \times n\) matrix.

2. Matrix anatomy

Each number inside a matrix is called an entry or element. We often refer to an entry by its row and column position.

For a general matrix

$$A = [a_{ij}]$$

the symbol \(a_{ij}\) means the entry in row \(i\) and column \(j\).

For example, if

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

then:

  • \(b_{11} = 7\)
  • \(b_{23} = 6\) because it is in row 2, column 3
  • \(b_{31} = 0\)

3. Special types of matrices

You should recognize a few common types of matrices.

  • Row matrix: has one row, such as \(\begin{bmatrix} 3 & 4 & 5 \end{bmatrix}\)
  • Column matrix: has one column, such as \(\begin{bmatrix} 2 \\ -1 \\ 6 \end{bmatrix}\)
  • Square matrix: has the same number of rows and columns, such as \(2 \times 2\) or \(3 \times 3\)
  • Zero matrix: all entries are 0
  • Identity matrix: a square matrix with 1s on the main diagonal and 0s elsewhere

For example, the \(2 \times 2\) identity matrix is

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

The identity matrix acts like the number 1 in matrix multiplication for compatible dimensions.

4. When are matrices equal?

Two matrices are equal only when:

  • they have the same dimensions, and
  • every corresponding entry is equal.

So these matrices are equal:

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

But these are not equal, even though they contain similar numbers, because the entries are arranged differently:

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

5. Matrix addition

To add two matrices, they must have the same dimensions. Then you add corresponding entries.

If

$$A = [a_{ij}] \quad \text{and} \quad B = [b_{ij}]$$

then

$$A + B = [a_{ij} + b_{ij}]$$

This means you add each entry in \(A\) to the entry in the same position in \(B\).

Worked Example 1: Matrix addition

Find \(A + B\) if

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

Step 1: Check dimensions.

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

Step 2: Add matching entries.

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

Important rule: You cannot add matrices with different dimensions.

For example, a \(2 \times 3\) matrix and a \(3 \times 2\) matrix cannot be added.

6. Scalar multiplication

A scalar is just a single number. To multiply a matrix by a scalar, multiply every entry in the matrix by that number.

If \(k\) is a scalar and \(A = [a_{ij}]\), then

$$kA = [ka_{ij}]$$

Worked Example 2: Scalar multiplication

Find \(-3A\) if

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

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

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

Step 2: Simplify.

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

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

7. Matrix multiplication

Matrix multiplication is different from addition. You do not multiply entries in the same position. Instead, you combine rows from the first matrix with columns from the second matrix.

This is the operation students most often find confusing, so always start by checking dimensions.

If matrix \(A\) has dimensions \(m \times n\) and matrix \(B\) has dimensions \(n \times p\), then the product \(AB\) is possible and the result has dimensions \(m \times p\).

The inside numbers must match:

$$ (m \times n)(n \times p) \to (m \times p) $$

If the inside numbers do not match, the product is undefined.

How to multiply matrices

  1. Take a row from the first matrix.
  2. Take a column from the second matrix.
  3. Multiply corresponding entries.
  4. Add the results.

This gives one entry in the product matrix.

Worked Example 3: Basic matrix multiplication

Find \(AB\) if

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

Step 1: Check dimensions.

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

Step 2: Find each entry.

First row of \(A\) with first column of \(B\):

$$2(5) + 1(1) = 10 + 1 = 11$$

First row of \(A\) with second column of \(B\):

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

Second row of \(A\) with first column of \(B\):

$$3(5) + 4(1) = 15 + 4 = 19$$

Second row of \(A\) with second column of \(B\):

$$3(-2) + 4(3) = -6 + 12 = 6$$

Step 3: Write the product matrix.

$$AB = \begin{bmatrix} 11 & -1 \\ 19 & 6 \end{bmatrix}$$

8. A very important fact: matrix multiplication is not usually commutative

For real numbers, \(2 \times 3 = 3 \times 2\). But for matrices, this is usually not true.

In general,

$$AB \ne BA$$

Sometimes both products exist but are different. Sometimes one exists and the other does not.

Worked Example 4: Dimensions and order matter

Let

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

Find \(AB\), and decide whether \(BA\) is defined.

Step 1: Check dimensions.

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

Since the inside numbers match, \(AB\) is defined and will be \(2 \times 2\).

Step 2: Compute \(AB\).

Entry in row 1, column 1:

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

Entry in row 1, column 2:

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

Entry in row 2, column 1:

$$(-1)(2) + 3(0) + 4(5) = -2 + 20 = 18$$

Entry in row 2, column 2:

$$(-1)(1) + 3(-2) + 4(3) = -1 - 6 + 12 = 5$$

So,

$$AB = \begin{bmatrix} 2 & -3 \\ 18 & 5 \end{bmatrix}$$

Step 3: Decide whether \(BA\) is defined.

\(B\) is \(3 \times 2\) and \(A\) is \(2 \times 3\). The inside numbers match again, so \(BA\) is also defined. Its result will be \(3 \times 3\), not \(2 \times 2\).

This already shows that \(AB\) and \(BA\) cannot be equal, because they do not even have the same dimensions.

9. Using matrices to organize data

Matrices are helpful because they can store real information clearly.

Suppose a school tracks the number of students in three clubs across two grade levels:

$$C = \begin{bmatrix} 18 & 12 & 10 \\ 15 & 9 & 14 \end{bmatrix}$$

You might interpret this as:

  • row 1 = Grade 11
  • row 2 = Grade 12
  • column 1 = Science Club
  • column 2 = Drama Club
  • column 3 = Debate Club

Then the entry \(12\) means there are 12 Grade 11 students in Drama Club.

If every club membership doubles for a special event, you can represent that by scalar multiplication:

$$2C = \begin{bmatrix} 36 & 24 & 20 \\ 30 & 18 & 28 \end{bmatrix}$$

If another matrix with the same dimensions records membership changes, you can add the matrices to update the data.

10. Common mistakes to avoid

  • Adding matrices with different dimensions. This is not allowed.
  • Forgetting to check dimensions before multiplying. Always check the inside numbers.
  • Multiplying matrices entry-by-entry. That is not standard matrix multiplication.
  • Assuming \(AB = BA\). In matrix algebra, order matters.
  • Giving the wrong dimensions for the product. Use the outside numbers after checking compatibility.

11. Quick rule guide

  • Matrix size: rows \(\times\) columns
  • Addition: same dimensions only
  • Scalar multiplication: multiply every entry
  • Matrix multiplication: \((m \times n)(n \times p) \to (m \times p)\)
  • Order matters: \(AB\) may not equal \(BA\)

12. Brief summary

A matrix is a rectangular array of numbers arranged in rows and columns. Its dimensions tell you how many rows and columns it has, and each entry is identified by its position.

You can add matrices only when they have the same dimensions, and scalar multiplication means multiplying every entry by the same number. For matrix multiplication, the number of columns in the first matrix must equal the number of rows in the second, and the product is found by combining rows with columns.

If you remember to check dimensions first, matrix operations become much easier and more reliable.

Put what you read to the test

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

Identity and Inverse Matrices

Identity and Inverse Matrices

Matrices are useful for organizing numbers and solving systems of equations. In matrix algebra, two very important ideas are the identity matrix and the inverse matrix. These ideas work much like the numbers 1 and reciprocals in ordinary arithmetic.

For example, with numbers, multiplying by 1 does not change the number: \(5 \cdot 1 = 5\). Also, the reciprocal of 5 is \(\frac{1}{5}\), and multiplying them gives 1: \(5 \cdot \frac{1}{5} = 1\). In matrix algebra, the identity matrix plays the role of 1, and the inverse matrix plays the role of a reciprocal.

Understanding these ideas helps us solve matrix equations and systems of linear equations more efficiently.

1. The Identity Matrix

The identity matrix is a square matrix with 1s on the main diagonal and 0s everywhere else. It is usually written as \(I\).

Some common identity matrices are:

$$ I_2 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \qquad I_3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} $$

The identity matrix has a special property: multiplying a matrix by the identity matrix does not change the matrix.

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

This only works when the sizes match correctly. For example, if \(A\) is a \(2 \times 2\) matrix, then it uses \(I_2\).

Example: Let

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

Then

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

and also

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

2. The Inverse of a Matrix

The inverse of a square matrix \(A\) is another matrix, written \(A^{-1}\), such that

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

This means that multiplying a matrix by its inverse gives the identity matrix.

Not every matrix has an inverse. A matrix that does have an inverse is called invertible or non-singular. A matrix that does not have an inverse is called singular.

Important conditions:

  • Only square matrices can have inverses.
  • A square matrix has an inverse only if its determinant is not zero.

So for a matrix \(A\):

$$ \det(A) \neq 0 \quad \Rightarrow \quad A^{-1} \text{ exists} $$

3. Inverse of a \(2 \times 2\) Matrix

If

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

then, provided that \(ad - bc \neq 0\), the inverse is

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

Notice the steps in the formula:

  • Find the determinant: \(ad - bc\)
  • Swap the positions of \(a\) and \(d\)
  • Change the signs of \(b\) and \(c\)
  • Multiply by \(\frac{1}{ad-bc}\)

Worked Example 1: Finding an Inverse

Find the inverse of

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

Step 1: Find the determinant.

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

Since \(\det(A) = 5 \neq 0\), the matrix is invertible.

Step 2: Use the inverse formula.

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

So,

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

4. Checking an Inverse

A good habit is to check your answer by multiplying the matrix and its inverse. If the result is the identity matrix, your inverse is correct.

Worked Example 2: Verify the Inverse

Using the matrix from Example 1:

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

Now multiply:

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

So the inverse is correct.

5. When a Matrix Has No Inverse

If the determinant of a square matrix is zero, the matrix does not have an inverse.

Worked Example 3: A Singular Matrix

Determine whether the matrix has an inverse:

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

Find the determinant:

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

Since the determinant is 0, \(B\) is singular. Therefore, \(B^{-1}\) does not exist.

6. Using Inverse Matrices to Solve Equations

Inverse matrices are very useful for solving matrix equations. Suppose we have

$$ AX = B $$

If \(A\) has an inverse, we can multiply both sides by \(A^{-1}\):

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

Since \(A^{-1}A = I\), this becomes

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

And because \(IX = X\), we get

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

This is one reason inverse matrices are so important in linear systems.

Worked Example 4: Solving a Matrix Equation

Solve

$$ \begin{pmatrix} 1 & 2 \\ 3 & 5 \end{pmatrix}X = \begin{pmatrix} 4 \\ 11 \end{pmatrix} $$

Step 1: Find the inverse of the coefficient matrix.

Let

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

Its determinant is

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

So the inverse exists.

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

Step 2: Multiply both sides by \(A^{-1}\).

$$ X = A^{-1}B = \begin{pmatrix} -5 & 2 \\ 3 & -1 \end{pmatrix} \begin{pmatrix} 4 \\ 11 \end{pmatrix} $$ $$ = \begin{pmatrix} (-5)(4) + (2)(11) \\ (3)(4) + (-1)(11) \end{pmatrix} = \begin{pmatrix} -20 + 22 \\ 12 - 11 \end{pmatrix} = \begin{pmatrix} 2 \\ 1 \end{pmatrix} $$

Therefore,

$$ X = \begin{pmatrix} 2 \\ 1 \end{pmatrix} $$

This means the solution to the system is \(x = 2\) and \(y = 1\).

7. Key Ideas to Remember

  • The identity matrix is the matrix version of the number 1.
  • For any matrix \(A\), multiplying by the identity matrix gives the same matrix: \(AI = IA = A\).
  • The inverse matrix is the matrix version of a reciprocal.
  • If \(A^{-1}\) exists, then \(AA^{-1} = A^{-1}A = I\).
  • A matrix has an inverse only if it is square and its determinant is not zero.
  • For a \(2 \times 2\) matrix, use the formula: $$ A^{-1} = \frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} $$
  • Inverse matrices can be used to solve equations like \(AX = B\) by writing \(X = A^{-1}B\).

8. Common Mistakes to Avoid

  • Forgetting to check the determinant. If the determinant is 0, there is no inverse.
  • Using the wrong identity matrix size. A \(2 \times 2\) matrix uses \(I_2\), a \(3 \times 3\) matrix uses \(I_3\), and so on.
  • Mixing up the inverse formula. Remember: swap \(a\) and \(d\), change the signs of \(b\) and \(c\).
  • Assuming matrix multiplication works like normal multiplication in every way. In matrix algebra, order matters, so be careful.

Brief Summary

The identity matrix is the matrix that leaves another matrix unchanged when multiplied. The inverse of a matrix is the matrix that multiplies with it to give the identity matrix.

Not every matrix has an inverse. A square matrix is invertible only when its determinant is not zero. For \(2 \times 2\) matrices, there is a simple formula for finding the inverse, and this inverse can be used to solve matrix equations and systems of linear equations.

Put what you read to the test

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

Determinants of Square Matrices

Determinants of Square Matrices are special numbers associated with square matrices such as a \(2 \times 2\) matrix or a \(3 \times 3\) matrix. They are useful in algebra because they help us decide whether a matrix has an inverse, and they are useful in geometry because they tell us how areas and volumes change under a transformation.

In this lesson, you will learn how to calculate determinants of \(2 \times 2\) and \(3 \times 3\) matrices, and how to interpret determinants as scaling factors for area and volume.

1. What is a determinant?

If \(A\) is a square matrix, its determinant is written as \(\det(A)\) or sometimes \(|A|\). Only square matrices have determinants.

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 \(2 \times 2\) determinant.

2. Determinant of a \(2 \times 2\) matrix

For a matrix

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

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

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

You can think of this as:

  • first diagonal product: \(a \cdot d\)
  • second diagonal product: \(b \cdot c\)
  • determinant: first product minus second product

Worked Example 1

Find the determinant of

$$A = \begin{pmatrix} 4 & 7 \\ 2 & 5 \end{pmatrix}.$$

Use the formula \(ad - bc\):

$$\det(A) = (4)(5) - (7)(2).$$ $$\det(A) = 20 - 14 = 6.$$

So, the determinant is 6.

Why this matters: since the determinant is not zero, the matrix is invertible. Geometrically, this matrix scales area by a factor of \(6\).

3. Determinant of a \(3 \times 3\) matrix

For a \(3 \times 3\) matrix, there are two common methods at this level:

  • diagonal products method (often called Sarrus' Rule)
  • cofactor expansion

Let

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

Method 1: Diagonal products (Sarrus' Rule)

Repeat the first two columns to the right:

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

Add the products of the three downward diagonals, then subtract the products of the three upward diagonals:

$$\det(A) = aei + bfg + cdh - ceg - bdi - afh.$$

This method works only for \(3 \times 3\) matrices.

Worked Example 2

Find the determinant of

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

Using diagonal products:

Downward diagonals:

$$1 \cdot 4 \cdot 6 = 24$$ $$2 \cdot 5 \cdot 1 = 10$$ $$3 \cdot 0 \cdot 0 = 0$$

Their sum is

$$24 + 10 + 0 = 34.$$

Upward diagonals:

$$3 \cdot 4 \cdot 1 = 12$$ $$1 \cdot 5 \cdot 0 = 0$$ $$2 \cdot 0 \cdot 6 = 0$$

Their sum is

$$12 + 0 + 0 = 12.$$

Now subtract:

$$\det(B) = 34 - 12 = 22.$$

So, the determinant is 22.

Method 2: Cofactor expansion

Cofactor expansion breaks a \(3 \times 3\) determinant into smaller \(2 \times 2\) determinants.

For the first row, the pattern of signs is:

$$+\quad -\quad +$$

So if

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

then expanding along the first row gives:

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

Each small determinant is called a minor. The sign attached to it makes it part of a cofactor.

Worked Example 3

Find the determinant of

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

using cofactor expansion along the first row.

Start with the sign pattern \(+,-,+\):

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

Now calculate each \(2 \times 2\) determinant:

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

Substitute these values:

$$\det(C) = 2(-8) - 1(-20) + 3(5).$$ $$\det(C) = -16 + 20 + 15 = 19.$$

So, the determinant is 19.

4. Choosing a good row or column for cofactor expansion

You can expand along any row or any column. A smart choice makes the work easier.

If a row or column contains zeros, expand along it, because terms with zero disappear.

Worked Example 4

Find the determinant of

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

The second column has a zero and another zero? Actually it has entries \(0,0,6\), so expanding down that column is easiest.

The sign pattern in a matrix alternates like this:

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

For the second column, only the entry \(6\) in row 3 matters.

Its sign is negative, so:

$$\det(D) = -6\begin{vmatrix} 3 & 2 \\ 1 & 4 \end{vmatrix}.$$

Now calculate the \(2 \times 2\) determinant:

$$\begin{vmatrix} 3 & 2 \\ 1 & 4 \end{vmatrix} = (3)(4) - (2)(1) = 12 - 2 = 10.$$

Therefore,

$$\det(D) = -6(10) = -60.$$

So, the determinant is -60.

5. Geometric meaning: area and volume scaling

Determinants are not just calculation tools. They also describe how a matrix changes size in geometry.

For a \(2 \times 2\) matrix, the absolute value \(|\det(A)|\) tells how much area is scaled.

  • If \(|\det(A)| = 1\), area stays the same.
  • If \(|\det(A)| = 3\), area becomes 3 times as large.
  • If \(|\det(A)| = \frac{1}{2}\), area becomes half as large.

For a \(3 \times 3\) matrix, the absolute value \(|\det(A)|\) tells how much volume is scaled.

The sign of the determinant also matters:

  • A positive determinant means orientation is preserved.
  • A negative determinant means orientation is reversed.

At this level, the most important idea is that:

$$|\det(A)| = \text{scale factor for area or volume.}$$

Example of interpretation

If a \(2 \times 2\) matrix has determinant \(-4\), then:

  • areas are multiplied by \(4\)
  • the negative sign shows a reversal in orientation

If a \(3 \times 3\) matrix has determinant \(0\), then the volume scale factor is \(0\). This means 3-dimensional space is flattened into a lower dimension, so the matrix is not invertible.

6. Determinant and invertibility

A square matrix is invertible if and only if its determinant is not zero.

So:

  • if \(\det(A) \neq 0\), the matrix has an inverse
  • if \(\det(A) = 0\), the matrix does not have an inverse

This is very important in linear systems. If the coefficient matrix of a system has determinant zero, the system may fail to have a unique solution.

7. Common mistakes to avoid

  • Forgetting the subtraction in \(2 \times 2\) determinants. It is \(ad - bc\), not \(ad + bc\).
  • Mixing up signs in cofactor expansion. The pattern starts with \(+\) and alternates.
  • Using Sarrus' Rule on matrices larger than \(3 \times 3\). It only works for \(3 \times 3\).
  • Forgetting that only square matrices have determinants.
  • Ignoring zeros when choosing a row or column for expansion. Zeros can save time.

8. Quick review of formulas

For a \(2 \times 2\) matrix:

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

For a \(3 \times 3\) matrix expanded along the first row:

$$\det\begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} = 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}. $$

And for interpretation:

$$|\det(A)| = \text{area scale factor in 2D, or volume scale factor in 3D.}$$

Brief Summary

A determinant is a number attached to a square matrix. For \(2 \times 2\) matrices, compute it with \(ad - bc\). For \(3 \times 3\) matrices, you can use diagonal products or cofactor expansion. Determinants tell us whether a matrix is invertible, and their absolute values show how a transformation scales area in 2D or volume in 3D.

Put what you read to the test

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

Matrix Equations and Cramer's Rule

Matrix Equations and Cramer’s Rule

Many real-world problems involve several unknown values that are connected by equations. For example, you might need to find the amounts of different products sold, the values of variables in a geometry problem, or the currents in an electrical circuit. When there are multiple equations and multiple unknowns, we call this a system of linear equations.

One powerful way to solve these systems is to rewrite them as a matrix equation. Another method, especially useful for smaller systems, is Cramer’s Rule, which uses determinants to find each variable directly.

In this lesson, you will learn how to:

  • write a system of equations as a matrix equation,
  • understand what the equation \(A\mathbf{x}=\mathbf{b}\) means,
  • solve systems using determinants and Cramer’s Rule,
  • decide when Cramer’s Rule can and cannot be used.

1. Writing a system as a matrix equation

Consider the system

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

This system can be written in matrix form as

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

This is usually written more simply as

$$ A\mathbf{x}=\mathbf{b} $$

where:

  • \(A\) is the coefficient matrix,
  • \(\mathbf{x}\) is the variable matrix (or unknown vector),
  • \(\mathbf{b}\) is the constant matrix.

For the example above,

$$ A=\begin{bmatrix}2&1\\3&-4\end{bmatrix}, \quad \mathbf{x}=\begin{bmatrix}x\\y\end{bmatrix}, \quad \mathbf{b}=\begin{bmatrix}7\\-5\end{bmatrix} $$

Writing a system this way helps us organize the equations clearly. It also connects linear systems to matrix algebra.

2. How matrix multiplication matches the equations

When we multiply

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

we get

$$ \begin{bmatrix} 2x+y\\ 3x-4y \end{bmatrix} $$

So the matrix equation

$$ A\mathbf{x}=\mathbf{b} $$

really means

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

which is exactly the same as the original system of equations.

3. Determinants and why they matter

Before using Cramer’s Rule, we need to understand the determinant. The determinant is a number connected to a square matrix. It helps tell us whether a system has one unique solution.

For a \(2\times 2\) matrix

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

the determinant is

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

If \(\det(A)\neq 0\), the system has a unique solution, and Cramer’s Rule can be used.

If \(\det(A)=0\), then Cramer’s Rule does not apply. In that case, the system may have no solution or infinitely many solutions.

For a \(3\times 3\) matrix

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

the determinant is

$$ \det(A)=a(ei-fh)-b(di-fg)+c(dh-eg) $$

You may also calculate this using expansion by minors or another method your class has learned.

4. What is Cramer’s Rule?

Cramer’s Rule gives formulas for each variable in a system using determinants.

For a system of two equations in two variables, written as

$$ \begin{cases} a_1x+b_1y=c_1\\ a_2x+b_2y=c_2 \end{cases} $$

the coefficient matrix is

$$ A=\begin{bmatrix}a_1&b_1\\a_2&b_2\end{bmatrix} $$

Then:

$$ D=\begin{vmatrix}a_1&b_1\\a_2&b_2\end{vmatrix} $$ $$ D_x=\begin{vmatrix}c_1&b_1\\c_2&b_2\end{vmatrix} \qquad D_y=\begin{vmatrix}a_1&c_1\\a_2&c_2\end{vmatrix} $$

And the solution is

$$ x=\frac{D_x}{D}, \qquad y=\frac{D_y}{D} $$

Notice the pattern:

  • To find \(x\), replace the x-column of the coefficient matrix with the constants.
  • To find \(y\), replace the y-column of the coefficient matrix with the constants.

For a \(3\times 3\) system, the idea is the same. If

$$ A\mathbf{x}=\mathbf{b} $$

with variables \(x\), \(y\), and \(z\), then

$$ x=\frac{D_x}{D},\qquad y=\frac{D_y}{D},\qquad z=\frac{D_z}{D} $$

where:

  • \(D=\det(A)\),
  • \(D_x\) is found by replacing the first column of \(A\) with the constants,
  • \(D_y\) is found by replacing the second column,
  • \(D_z\) is found by replacing the third column.

5. Worked Example 1: Writing a system as a matrix equation

Write the system as a matrix equation:

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

Step 1: Build the coefficient matrix.

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

Step 2: Write the variable matrix.

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

Step 3: Write the constant matrix.

$$ \mathbf{b}=\begin{bmatrix}10\\1\end{bmatrix} $$

Matrix equation:

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

So the system is written as \(A\mathbf{x}=\mathbf{b}\).

6. Worked Example 2: Solve a 2 by 2 system using Cramer’s Rule

Solve the system

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

Step 1: Find the main determinant.

$$ D=\begin{vmatrix}2&1\\3&-4\end{vmatrix}=(2)(-4)-(1)(3)=-8-3=-11 $$

Since \(D\neq 0\), there is one unique solution.

Step 2: Find \(D_x\).

Replace the x-column with the constants:

$$ D_x=\begin{vmatrix}7&1\\-5&-4\end{vmatrix}=(7)(-4)-(1)(-5)=-28+5=-23 $$

Step 3: Find \(D_y\).

Replace the y-column with the constants:

$$ D_y=\begin{vmatrix}2&7\\3&-5\end{vmatrix}=(2)(-5)-(7)(3)=-10-21=-31 $$

Step 4: Use the formulas.

$$ x=\frac{D_x}{D}=\frac{-23}{-11}=\frac{23}{11} $$ $$ y=\frac{D_y}{D}=\frac{-31}{-11}=\frac{31}{11} $$

Solution:

$$ \left(x,y\right)=\left(\frac{23}{11},\frac{31}{11}\right) $$

Quick check:

$$ 2\left(\frac{23}{11}\right)+\frac{31}{11}=\frac{46}{11}+\frac{31}{11}=\frac{77}{11}=7 $$ $$ 3\left(\frac{23}{11}\right)-4\left(\frac{31}{11}\right)=\frac{69}{11}-\frac{124}{11}=\frac{-55}{11}=-5 $$

The solution is correct.

7. Worked Example 3: Solve a 3 by 3 system using Cramer’s Rule

Solve the system

$$ \begin{cases} x+y+z=6\\ 2x-y+z=3\\ x+2y-z=3 \end{cases} $$

Step 1: Write the coefficient matrix and constants.

$$ A=\begin{bmatrix}1&1&1\\2&-1&1\\1&2&-1\end{bmatrix}, \qquad \mathbf{b}=\begin{bmatrix}6\\3\\3\end{bmatrix} $$

Step 2: Find \(D=\det(A)\).

$$ D=\begin{vmatrix}1&1&1\\2&-1&1\\1&2&-1\end{vmatrix} $$

Expand along the first row:

$$ D=1\begin{vmatrix}-1&1\\2&-1\end{vmatrix}-1\begin{vmatrix}2&1\\1&-1\end{vmatrix}+1\begin{vmatrix}2&-1\\1&2\end{vmatrix} $$ $$ D=1[(-1)(-1)-(1)(2)]-1[(2)(-1)-(1)(1)]+1[(2)(2)-(-1)(1)] $$ $$ D=1(1-2)-1(-2-1)+1(4+1) $$ $$ D=-1+3+5=7 $$

Since \(D\neq 0\), Cramer’s Rule can be used.

Step 3: Find \(D_x\).

Replace the first column with the constants:

$$ D_x=\begin{vmatrix}6&1&1\\3&-1&1\\3&2&-1\end{vmatrix} $$ $$ D_x=6\begin{vmatrix}-1&1\\2&-1\end{vmatrix}-1\begin{vmatrix}3&1\\3&-1\end{vmatrix}+1\begin{vmatrix}3&-1\\3&2\end{vmatrix} $$ $$ D_x=6[(1-2)]-[(3)(-1)-(1)(3)]+[(3)(2)-(-1)(3)] $$ $$ D_x=6(-1)-(-3-3)+(6+3) $$ $$ D_x=-6+6+9=9 $$

Step 4: Find \(D_y\).

Replace the second column with the constants:

$$ D_y=\begin{vmatrix}1&6&1\\2&3&1\\1&3&-1\end{vmatrix} $$ $$ D_y=1\begin{vmatrix}3&1\\3&-1\end{vmatrix}-6\begin{vmatrix}2&1\\1&-1\end{vmatrix}+1\begin{vmatrix}2&3\\1&3\end{vmatrix} $$ $$ D_y=1[(3)(-1)-(1)(3)]-6[(2)(-1)-(1)(1)]+1[(2)(3)-(3)(1)] $$ $$ D_y=(-3-3)-6(-2-1)+(6-3) $$ $$ D_y=-6+18+3=15 $$

Step 5: Find \(D_z\).

Replace the third column with the constants:

$$ D_z=\begin{vmatrix}1&1&6\\2&-1&3\\1&2&3\end{vmatrix} $$ $$ D_z=1\begin{vmatrix}-1&3\\2&3\end{vmatrix}-1\begin{vmatrix}2&3\\1&3\end{vmatrix}+6\begin{vmatrix}2&-1\\1&2\end{vmatrix} $$ $$ D_z=1[(-1)(3)-(3)(2)]-1[(2)(3)-(3)(1)]+6[(2)(2)-(-1)(1)] $$ $$ D_z=(-3-6)-(6-3)+6(4+1) $$ $$ D_z=-9-3+30=18 $$

Step 6: Find the variables.

$$ x=\frac{D_x}{D}=\frac{9}{7}, \qquad y=\frac{D_y}{D}=\frac{15}{7}, \qquad z=\frac{D_z}{D}=\frac{18}{7} $$

Solution:

$$ \left(x,y,z\right)=\left(\frac{9}{7},\frac{15}{7},\frac{18}{7}\right) $$

8. Worked Example 4: When Cramer’s Rule cannot be used

Consider the system

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

Step 1: Find the determinant.

$$ D=\begin{vmatrix}2&4\\1&2\end{vmatrix}=(2)(2)-(4)(1)=4-4=0 $$

Because \(D=0\), Cramer’s Rule cannot be used.

What does this mean?

The second equation is exactly half of the first equation, so both equations represent the same line. That means there are infinitely many solutions, not one unique solution.

If the equations had been inconsistent instead, then there would be no solution. In both cases, when \(D=0\), Cramer’s Rule does not give a valid answer.

9. Steps for using Cramer’s Rule

  1. Write the system in the same variable order in every equation.
  2. Form the coefficient matrix \(A\).
  3. Find the determinant \(D=\det(A)\).
  4. If \(D=0\), stop. Cramer’s Rule cannot be used.
  5. If \(D\neq 0\), create new determinants by replacing one column at a time with the constants.
  6. Divide each new determinant by \(D\) to find the corresponding variable.

10. Common mistakes to avoid

  • Mixing up columns: Replace the correct variable’s column with the constants.
  • Changing variable order: If your equations are arranged as \(x,y,z\), keep that order throughout.
  • Sign errors in determinants: Be careful when subtracting and multiplying negative numbers.
  • Forgetting to check \(D\): Always compute the main determinant first.
  • Using Cramer’s Rule on non-square systems: The method works only when the number of equations equals the number of variables and the coefficient matrix is square.

11. When is Cramer’s Rule useful?

Cramer’s Rule is especially helpful when:

  • the system is small, such as \(2\times 2\) or \(3\times 3\),
  • you are asked to solve using determinants,
  • you want a direct formula for each variable.

For larger systems, other methods such as row reduction are usually more efficient. Still, Cramer’s Rule is important because it connects systems of equations, matrices, and determinants in a clear way.

12. Final summary

A system of linear equations can be written as a matrix equation \(A\mathbf{x}=\mathbf{b}\). This form organizes the coefficients, variables, and constants in a neat structure.

Cramer’s Rule solves a square system by using determinants. First, find the determinant of the coefficient matrix. If it is not zero, replace one column at a time with the constants to form new determinants, then divide by the main determinant to get each variable.

The most important idea to remember is this: Cramer’s Rule works only when the determinant of the coefficient matrix is not zero. If the determinant is zero, the system does not have a unique solution, so this method cannot be used.

Put what you read to the test

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

Gaussian Elimination and Row Echelon Form

Gaussian Elimination and Row Echelon Form are powerful tools for solving systems of linear equations. Instead of working with several equations one at a time, we organize the system into a matrix and use row operations to simplify it step by step.

This method is especially useful for larger systems, such as three equations in three variables. It helps us decide whether a system has one solution, no solution, or infinitely many solutions.

In this lesson, you will learn what an augmented matrix is, what row echelon form means, which row operations are allowed, and how to use Gaussian elimination to solve systems.

1. From a system of equations to an augmented matrix

A system of linear equations can be written in matrix form by listing only the coefficients and constants. This is called an augmented matrix.

For example, the system

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

becomes the augmented matrix

$$ \left[\begin{array}{cc|c} 2 & 1 & 5 \\ 1 & -1 & 1 \end{array}\right]. $$

The vertical line separates the coefficients from the constants on the right side of the equations.

2. Elementary row operations

Gaussian elimination works by applying elementary row operations. These operations do not change the solution of the system.

  • Swap two rows: \(R_i \leftrightarrow R_j\)
  • Multiply a row by a nonzero number: \(R_i \to kR_i\), where \(k \ne 0\)
  • Add a multiple of one row to another row: \(R_j \to R_j + kR_i\)

These moves let us create zeros below leading entries and gradually simplify the matrix.

3. What is row echelon form?

A matrix is in row echelon form when it has the following features:

  • Any rows made entirely of zeros are at the bottom.
  • The first nonzero number in each nonzero row is called a leading entry.
  • Each leading entry is to the right of the leading entry in the row above it.
  • All entries below each leading entry are zero.

For example,

$$ \left[\begin{array}{ccc|c} 1 & 2 & -1 & 3 \\ 0 & 1 & 4 & 5 \\ 0 & 0 & 2 & -6 \end{array}\right] $$

is in row echelon form. The leading entries move to the right as you go down the rows, and everything below them is zero.

4. The idea of Gaussian elimination

Gaussian elimination means using row operations to turn an augmented matrix into row echelon form. Once the matrix is in row echelon form, we solve the system using back-substitution.

The general process is:

  1. Write the augmented matrix.
  2. Choose a leading entry in the first row.
  3. Use row operations to make all entries below that leading entry equal to zero.
  4. Move to the next row and next column, and repeat.
  5. When the matrix is in row echelon form, solve from the bottom row upward.

Worked Example 1: A simple 2 by 2 system

Solve the system

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

Step 1: Write the augmented matrix.

$$ \left[\begin{array}{cc|c} 2 & 1 & 5 \\ 1 & -1 & 1 \end{array}\right] $$

It is often convenient to place a 1 in the top-left corner, so swap the rows.

$$ R_1 \leftrightarrow R_2 $$ $$ \left[\begin{array}{cc|c} 1 & -1 & 1 \\ 2 & 1 & 5 \end{array}\right] $$

Step 2: Eliminate the entry below the leading 1.

$$ R_2 \to R_2 - 2R_1 $$ $$ \left[\begin{array}{cc|c} 1 & -1 & 1 \\ 0 & 3 & 3 \end{array}\right] $$

Now the matrix is in row echelon form.

Step 3: Back-substitute.

From the second row,

$$ 3y = 3 \quad \Rightarrow \quad y = 1. $$

From the first row,

$$ x - y = 1. $$

Substitute \(y=1\):

$$ x - 1 = 1 \quad \Rightarrow \quad x = 2. $$

Solution: \((x,y) = (2,1)\).

Worked Example 2: A 3 by 3 system with one solution

Solve the system

$$ \begin{aligned} x + y + z &= 6 \\ 2x - y + z &= 3 \\ x + 2y - z &= 3 \end{aligned} $$

Step 1: Write the augmented matrix.

$$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & -1 & 1 & 3 \\ 1 & 2 & -1 & 3 \end{array}\right] $$

Step 2: Eliminate entries below the first leading entry.

$$ R_2 \to R_2 - 2R_1, \qquad R_3 \to R_3 - R_1 $$ $$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & -3 & -1 & -9 \\ 0 & 1 & -2 & -3 \end{array}\right] $$

Step 3: Use the second row to create a leading entry in the second column. It is easier if we swap rows 2 and 3.

$$ R_2 \leftrightarrow R_3 $$ $$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -2 & -3 \\ 0 & -3 & -1 & -9 \end{array}\right] $$

Step 4: Eliminate the entry below the leading 1 in row 2.

$$ R_3 \to R_3 + 3R_2 $$ $$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -2 & -3 \\ 0 & 0 & -7 & -18 \end{array}\right] $$

This is row echelon form.

Step 5: Back-substitute.

From row 3:

$$ -7z = -18 \quad \Rightarrow \quad z = \frac{18}{7}. $$

From row 2:

$$ y - 2z = -3. $$

Substitute \(z = \frac{18}{7}\):

$$ y - \frac{36}{7} = -3 = -\frac{21}{7} $$ $$ y = \frac{15}{7}. $$

From row 1:

$$ x + y + z = 6. $$

Substitute \(y = \frac{15}{7}\) and \(z = \frac{18}{7}\):

$$ x + \frac{15}{7} + \frac{18}{7} = 6 = \frac{42}{7} $$ $$ x = \frac{42}{7} - \frac{33}{7} = \frac{9}{7}. $$

Solution: \(\left(x,y,z\right) = \left(\frac{9}{7}, \frac{15}{7}, \frac{18}{7}\right)\).

Worked Example 3: A system with no solution

Solve the system

$$ \begin{aligned} x + y &= 2 \\ 2x + 2y &= 5 \end{aligned} $$

Write the augmented matrix:

$$ \left[\begin{array}{cc|c} 1 & 1 & 2 \\ 2 & 2 & 5 \end{array}\right] $$

Eliminate the entry below the first leading entry:

$$ R_2 \to R_2 - 2R_1 $$ $$ \left[\begin{array}{cc|c} 1 & 1 & 2 \\ 0 & 0 & 1 \end{array}\right] $$

The second row represents

$$ 0x + 0y = 1, $$

which is impossible. This means the system is inconsistent.

Conclusion: the system has no solution.

Worked Example 4: A system with infinitely many solutions

Solve the system

$$ \begin{aligned} x + y + z &= 4 \\ 2x + 2y + 2z &= 8 \\ x - y + z &= 2 \end{aligned} $$

Write the augmented matrix:

$$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 4 \\ 2 & 2 & 2 & 8 \\ 1 & -1 & 1 & 2 \end{array}\right] $$

Eliminate below the first leading entry:

$$ R_2 \to R_2 - 2R_1, \qquad R_3 \to R_3 - R_1 $$ $$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 4 \\ 0 & 0 & 0 & 0 \\ 0 & -2 & 0 & -2 \end{array}\right] $$

Swap rows 2 and 3 to place the zero row at the bottom:

$$ R_2 \leftrightarrow R_3 $$ $$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 4 \\ 0 & -2 & 0 & -2 \\ 0 & 0 & 0 & 0 \end{array}\right] $$

Simplify row 2:

$$ R_2 \to -\frac{1}{2}R_2 $$ $$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 4 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 \end{array}\right] $$

Now translate the rows back into equations:

$$ \begin{aligned} x + y + z &= 4 \\ y &= 1 \end{aligned} $$

Since there is no leading entry in the \(z\)-column, \(z\) is a free variable. Let

$$ z = t. $$

Then \(y=1\), and from the first equation,

$$ x + 1 + t = 4 \quad \Rightarrow \quad x = 3 - t. $$

Solution:

$$ (x,y,z) = (3-t,1,t), \quad \text{for any real number } t. $$

This system has infinitely many solutions.

5. How to recognize the type of solution

After reducing a system, the final matrix tells us what kind of solution the system has.

  • One solution: every variable gets a leading entry, and there is no contradiction.
  • No solution: a row becomes something like \([0\;0\;0\;|\;1]\), which means \(0=1\).
  • Infinitely many solutions: there is at least one free variable, and there is no contradiction.

6. Important vocabulary

  • Leading entry: the first nonzero number in a nonzero row.
  • Pivot position: the position of a leading entry.
  • Free variable: a variable whose column does not contain a leading entry.
  • Back-substitution: solving from the bottom row upward after reaching row echelon form.
  • Inconsistent system: a system with no solution.

7. Good habits when using Gaussian elimination

  • Write each row operation clearly so you can follow your steps.
  • Try to create leading 1s when possible, since they make the arithmetic easier.
  • Be careful with negative signs and fractions.
  • If a row becomes all zeros, move it to the bottom.
  • Always check at the end whether your result means one solution, none, or infinitely many.

8. Common mistakes to avoid

  • Forgetting to apply a row operation to every entry in the row, including the constant term.
  • Confusing row echelon form with the final answer. You still need back-substitution unless the answer is already obvious.
  • Stopping too early before all entries below each leading entry are zero.
  • Missing the meaning of a zero row. A zero row can mean either redundancy or, if the constant is nonzero, a contradiction.

Brief Summary

Gaussian elimination is a method for solving linear systems by turning the augmented matrix into row echelon form using elementary row operations. Once in row echelon form, we use back-substitution to find the values of the variables.

This method also helps us recognize whether a system has one solution, no solution, or infinitely many solutions. Learning to read the matrix carefully is just as important as doing the row operations correctly.

Put what you read to the test

You've worked through Gaussian Elimination and Row Echelon Form. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.

Linear Programming and Feasible Regions

Linear Programming and Feasible Regions

Linear programming is a method used to find the best possible value of a quantity, such as maximum profit or minimum cost, when there are restrictions on what is possible.

These restrictions are written as linear inequalities, and the set of all points that satisfy them forms the feasible region. In many Grade 12 problems, this feasible region is a polygonal shape on a graph.

The key idea in linear programming is that if an objective function is linear, then its greatest or least value on a feasible region occurs at one of the corner points (also called vertices) of that region.

In this lesson, you will learn how to graph linear inequalities, identify a feasible region, find its corner points, and use those points to optimize an objective function.

1. What is linear programming?

A linear programming problem has two main parts:

  • Constraints: linear inequalities that describe the limits of the situation.
  • Objective function: a linear expression that must be maximized or minimized.

For example, if a company makes two products, with quantities represented by \(x\) and \(y\), then a profit equation might be

$$P = 40x + 25y$$

where \(P\) is the total profit. If there are limits on materials, time, or labor, those limits become inequalities such as

$$2x + y \leq 20$$ $$x + 3y \leq 30$$ $$x \geq 0, \quad y \geq 0$$

These inequalities describe all possible combinations of \(x\) and \(y\) that are allowed.

2. Important vocabulary

  • Linear inequality: an inequality such as \(2x + y \leq 10\).
  • Constraint: a condition that must be satisfied.
  • Feasible region: the set of all points that satisfy every constraint.
  • Objective function: the expression to maximize or minimize.
  • Corner point / vertex: a point where boundary lines of the feasible region meet.
  • Optimization: finding the maximum or minimum value of the objective function.

3. How to graph a linear inequality

To graph an inequality such as \(x + y \leq 6\), first graph the related line:

$$x + y = 6$$

You can find two points on the line:

  • If \(x = 0\), then \(y = 6\), so \((0,6)\) is on the line.
  • If \(y = 0\), then \(x = 6\), so \((6,0)\) is on the line.

Draw a solid line if the inequality includes equality, such as \(\leq\) or \(\geq\). Draw a dashed line if it is \(<\) or \(>\).

Then decide which side to shade. A quick method is to test a point not on the line, usually \((0,0)\).

For \(x + y \leq 6\), test \((0,0)\):

$$0 + 0 \leq 6$$

This is true, so shade the side containing \((0,0)\).

4. Finding the feasible region

When there is more than one inequality, graph each one on the same set of axes. The feasible region is the area where all shaded regions overlap.

In linear programming problems, there are often also non-negativity constraints:

$$x \geq 0, \quad y \geq 0$$

These mean the solution must be in the first quadrant or on the axes.

The feasible region may be:

  • Bounded: enclosed, forming a closed shape such as a triangle or quadrilateral.
  • Unbounded: open and extending forever in some direction.
  • Empty: if no point satisfies all constraints.

5. Why do we check corner points?

For a linear objective function over a polygonal feasible region, the maximum or minimum value occurs at a corner point.

This means that after graphing the feasible region, you do not need to test every point. You only need to:

  1. Find all corner points.
  2. Substitute each corner point into the objective function.
  3. Choose the largest value for a maximum problem, or the smallest value for a minimum problem.

6. How to find corner points

Corner points come from intersections of boundary lines and sometimes from the axes.

To find the intersection of two lines, solve the system of equations formed by their boundaries.

For example, if the boundaries are

$$x + y = 6$$ $$2x + y = 8$$

subtract the first equation from the second:

$$2x + y - (x + y) = 8 - 6$$ $$x = 2$$

Then substitute into \(x + y = 6\):

$$2 + y = 6$$ $$y = 4$$

So the intersection point is \((2,4)\).

Worked Example 1: Graphing a feasible region

Graph the system:

$$x + y \leq 6$$ $$x \geq 1$$ $$y \geq 0$$

Step 1: Graph each boundary.

  • \(x + y = 6\) is a solid line through \((0,6)\) and \((6,0)\).
  • \(x = 1\) is a solid vertical line.
  • \(y = 0\) is the \(x\)-axis.

Step 2: Shade the correct sides.

  • \(x + y \leq 6\): shade below the line.
  • \(x \geq 1\): shade to the right of the line \(x = 1\).
  • \(y \geq 0\): shade above the \(x\)-axis.

Step 3: Identify the overlap.

The feasible region is the triangular region bounded by \(x = 1\), \(y = 0\), and \(x + y = 6\).

Step 4: Find the corner points.

  • Intersection of \(x=1\) and \(y=0\): \((1,0)\)
  • Intersection of \(y=0\) and \(x+y=6\): \((6,0)\)
  • Intersection of \(x=1\) and \(x+y=6\): \(1+y=6\), so \(y=5\), giving \((1,5)\)

So the corner points are \((1,0)\), \((6,0)\), and \((1,5)\).

Worked Example 2: Maximizing an objective function

Maximize

$$P = 3x + 2y$$

subject to

$$x + y \leq 6$$ $$x \geq 1$$ $$y \geq 0$$

From Example 1, the feasible region has corner points:

$$ (1,0), \quad (6,0), \quad (1,5) $$

Step 1: Evaluate the objective function at each corner point.

At \((1,0)\):

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

At \((6,0)\):

$$P = 3(6) + 2(0) = 18$$

At \((1,5)\):

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

Step 2: Choose the greatest value.

The maximum value is

$$P = 18$$

and it occurs at

$$ (x,y) = (6,0) $$

Answer: The objective function is maximized at \((6,0)\), with maximum value \(18\).

Worked Example 3: Finding a vertex by solving a system

Minimize

$$C = 4x + 5y$$

subject to

$$x + y \geq 4$$ $$2x + y \geq 5$$ $$x \geq 0, \quad y \geq 0$$

Step 1: Understand the boundaries.

  • \(x + y = 4\)
  • \(2x + y = 5\)
  • the coordinate axes

Because both inequalities are \(\geq\), the feasible region is above both lines in the first quadrant.

Step 2: Find likely corner points.

The corner points come from intersections of boundaries that lie in the feasible region.

First, find the intersection of

$$x + y = 4$$ $$2x + y = 5$$

Subtract the first equation from the second:

$$x = 1$$

Substitute into \(x + y = 4\):

$$1 + y = 4$$ $$y = 3$$

So one corner point is \((1,3)\).

Now check axis intersections that satisfy all constraints:

  • On the \(y\)-axis, \(x=0\). Then \(x+y\geq4\) gives \(y\geq4\), and \(2x+y\geq5\) gives \(y\geq5\). So the lowest feasible point on the \(y\)-axis is \((0,5)\).
  • On the \(x\)-axis, \(y=0\). Then \(x+y\geq4\) gives \(x\geq4\), and \(2x+y\geq5\) gives \(x\geq2.5\). So the lowest feasible point on the \(x\)-axis is \((4,0)\).

The relevant corner points are:

$$ (0,5), \quad (1,3), \quad (4,0) $$

Step 3: Evaluate the objective function.

At \((0,5)\):

$$C = 4(0) + 5(5) = 25$$

At \((1,3)\):

$$C = 4(1) + 5(3) = 4 + 15 = 19$$

At \((4,0)\):

$$C = 4(4) + 5(0) = 16$$

Step 4: Choose the smallest value.

The minimum value is

$$C = 16$$

at the point

$$ (4,0) $$

Answer: The objective function is minimized at \((4,0)\), with minimum value \(16\).

Worked Example 4: A word problem

A school can make two types of gift bags: type A and type B.

Let:

  • \(x\) = number of type A bags
  • \(y\) = number of type B bags

Each type A bag uses 2 ribbons and 1 card. Each type B bag uses 1 ribbon and 2 cards.

The school has at most 10 ribbons and at most 8 cards.

Profit is \(R15\) for each type A bag and \(R12\) for each type B bag.

How many of each type should be made to maximize profit?

Step 1: Write the constraints.

Ribbon limit:

$$2x + y \leq 10$$

Card limit:

$$x + 2y \leq 8$$

Non-negativity:

$$x \geq 0, \quad y \geq 0$$

Step 2: Write the objective function.

$$P = 15x + 12y$$

Step 3: Find the corner points of the feasible region.

The region lies in the first quadrant and under both lines.

Corner points on the axes:

  • If \(y=0\), then \(2x \leq 10\) and \(x \leq 8\), so \(x \leq 5\). This gives \((5,0)\).
  • If \(x=0\), then \(y \leq 10\) and \(2y \leq 8\), so \(y \leq 4\). This gives \((0,4)\).
  • The origin \((0,0)\) is also a corner point.

Now find the intersection of the two lines:

$$2x + y = 10$$ $$x + 2y = 8$$

From the first equation,

$$y = 10 - 2x$$

Substitute into the second:

$$x + 2(10 - 2x) = 8$$ $$x + 20 - 4x = 8$$ $$-3x = -12$$ $$x = 4$$

Then

$$y = 10 - 2(4) = 2$$

So the intersection point is \((4,2)\).

The corner points are:

$$ (0,0), \quad (5,0), \quad (4,2), \quad (0,4) $$

Step 4: Evaluate the profit at each corner point.

At \((0,0)\):

$$P = 15(0) + 12(0) = 0$$

At \((5,0)\):

$$P = 15(5) + 12(0) = 75$$

At \((4,2)\):

$$P = 15(4) + 12(2) = 60 + 24 = 84$$

At \((0,4)\):

$$P = 15(0) + 12(4) = 48$$

Step 5: State the best answer.

The maximum profit is

$$P = 84$$

when the school makes

$$4 \text{ type A bags and } 2 \text{ type B bags}$$

7. A step-by-step method for solving linear programming problems

  1. Define the variables clearly, usually \(x\) and \(y\).
  2. Write the constraints as linear inequalities.
  3. Include \(x \geq 0\) and \(y \geq 0\) if negative values do not make sense.
  4. Graph each boundary line.
  5. Shade the correct side of each inequality.
  6. Identify the feasible region.
  7. Find all corner points.
  8. Substitute each corner point into the objective function.
  9. Choose the maximum or minimum value as required.

8. Common mistakes to avoid

  • Forgetting solid vs dashed lines: use a solid line for \(\leq\) or \(\geq\), dashed for \(<\) or \(>\).
  • Shading the wrong side: always test a point such as \((0,0)\) when possible.
  • Ignoring non-negativity: if \(x\) and \(y\) represent amounts, they usually cannot be negative.
  • Missing a corner point: check intersections of lines and axes carefully.
  • Testing random points instead of corner points: for linear programming, corner points are what matter.
  • Not answering the context: in word problems, state what \(x\) and \(y\) mean in the real situation.

9. Quick check for understanding

If a feasible region has corner points \((0,0)\), \((2,5)\), \((6,1)\), and the objective function is

$$Z = 2x + 3y$$

then evaluate:

  • At \((0,0)\): \(Z = 0\)
  • At \((2,5)\): \(Z = 2(2)+3(5)=4+15=19\)
  • At \((6,1)\): \(Z = 2(6)+3(1)=12+3=15\)

So the maximum is \(19\), at \((2,5)\).

10. Summary

Linear programming helps us find the best value of a linear objective function while obeying a set of linear constraints.

To solve these problems, graph the inequalities, locate the feasible region, and identify its corner points. Then substitute each corner point into the objective function. The largest or smallest value at those points gives the optimal solution.

Once you understand how to graph inequalities and solve for intersections, linear programming becomes a clear and powerful way to solve real-life optimization problems.

Put what you read to the test

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

Eigenvalues and Eigenvectors

Eigenvalues and Eigenvectors

When a matrix transforms a vector, the vector usually changes both its length and its direction. But some special vectors behave in a very neat way: after the transformation, they still point in the same direction, or exactly the opposite direction. These special vectors are called eigenvectors.

The number that tells us how much the vector is stretched, shrunk, or flipped is called the eigenvalue.

So, eigenvectors and eigenvalues help us answer this question:

Which vectors keep their direction under a matrix transformation, and by what factor are they scaled?

This idea is important in matrix algebra because it helps us understand the behavior of transformations more deeply than just multiplying matrices and vectors.

1. The basic definition

Let \(A\) be a square matrix. A non-zero vector \(\mathbf{v}\) is called an eigenvector of \(A\) if

$$A\mathbf{v}=\lambda \mathbf{v}$$

for some scalar \(\lambda\). That scalar \(\lambda\) is called an eigenvalue.

This equation means:

  • Multiply the matrix \(A\) by the vector \(\mathbf{v}\).
  • The result is just the original vector \(\mathbf{v}\) multiplied by a number \(\lambda\).
  • So the vector stays parallel to itself.

Important: the eigenvector must be non-zero. The zero vector is not allowed, because every matrix sends \(\mathbf{0}\) to \(\mathbf{0}\), which would not give useful information.

2. Geometric meaning

Think of a matrix as a transformation of the plane or space.

  • If \(\lambda > 1\), the eigenvector gets stretched.
  • If \(0<\lambda<1\), the eigenvector gets shrunk.
  • If \(\lambda<0\), the vector reverses direction as well as being scaled.
  • If \(\lambda=1\), the vector keeps the same length and direction.
  • If \(\lambda=0\), the vector is sent to the zero vector.

So eigenvectors show the directions that are unchanged by the transformation, except for scaling.

3. How to find eigenvalues

Start with the equation

$$A\mathbf{v}=\lambda \mathbf{v}$$

Bring everything to one side:

$$A\mathbf{v}-\lambda \mathbf{v}=\mathbf{0}$$

Since \(\lambda\mathbf{v}=\lambda I\mathbf{v}\), where \(I\) is the identity matrix, we can write

$$A\mathbf{v}-\lambda I\mathbf{v}=\mathbf{0}$$ $$\left(A-\lambda I\right)\mathbf{v}=\mathbf{0}$$

For this system to have a non-zero solution \(\mathbf{v}\), the matrix \(A-\lambda I\) must be singular. That means its determinant is zero:

$$\det(A-\lambda I)=0$$

This equation is called the characteristic equation.

Solving it gives the eigenvalues.

4. How to find eigenvectors

Once you know an eigenvalue \(\lambda\), substitute it into

$$\left(A-\lambda I\right)\mathbf{v}=\mathbf{0}$$

Then solve the resulting system. Any non-zero solution is an eigenvector for that eigenvalue.

Because eigenvectors can be multiplied by any non-zero constant and still point in the same direction, there are usually many eigenvectors for one eigenvalue. They are all scalar multiples of each other.

For example, if \(\begin{pmatrix}1\\2\end{pmatrix}\) is an eigenvector, then \(\begin{pmatrix}2\\4\end{pmatrix}\) and \(\begin{pmatrix}-3\\-6\end{pmatrix}\) are also eigenvectors for the same eigenvalue.

5. Step-by-step method

  1. Check that the matrix is square.
  2. Form \(A-\lambda I\).
  3. Compute \(\det(A-\lambda I)\).
  4. Set the determinant equal to zero and solve for \(\lambda\).
  5. For each eigenvalue, solve \((A-\lambda I)\mathbf{v}=\mathbf{0}\).
  6. Write the eigenvectors as non-zero vectors.

Worked Example 1: A diagonal matrix

Find the eigenvalues and eigenvectors of

$$A=\begin{pmatrix}3&0\\0&5\end{pmatrix}$$

Step 1: Find the eigenvalues

$$A-\lambda I=\begin{pmatrix}3-\lambda&0\\0&5-\lambda\end{pmatrix}$$

Now find the determinant:

$$\det(A-\lambda I)=(3-\lambda)(5-\lambda)$$

Set it equal to zero:

$$ (3-\lambda)(5-\lambda)=0 $$

So the eigenvalues are

$$\lambda=3 \quad \text{and} \quad \lambda=5$$

Step 2: Find eigenvectors for \(\lambda=3\)

$$A-3I=\begin{pmatrix}0&0\\0&2\end{pmatrix}$$

Solve

$$\begin{pmatrix}0&0\\0&2\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}$$

This gives \(2y=0\), so \(y=0\). The variable \(x\) is free.

So eigenvectors are all non-zero vectors of the form

$$\begin{pmatrix}x\\0\end{pmatrix}$$

One simple choice is

$$\mathbf{v}=\begin{pmatrix}1\\0\end{pmatrix}$$

Step 3: Find eigenvectors for \(\lambda=5\)

$$A-5I=\begin{pmatrix}-2&0\\0&0\end{pmatrix}$$

Solve

$$\begin{pmatrix}-2&0\\0&0\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}$$

This gives \(-2x=0\), so \(x=0\). The variable \(y\) is free.

So eigenvectors are all non-zero vectors of the form

$$\begin{pmatrix}0\\y\end{pmatrix}$$

One simple choice is

$$\mathbf{v}=\begin{pmatrix}0\\1\end{pmatrix}$$

Conclusion:

  • Eigenvalue \(3\) has eigenvectors parallel to \(\begin{pmatrix}1\\0\end{pmatrix}\).
  • Eigenvalue \(5\) has eigenvectors parallel to \(\begin{pmatrix}0\\1\end{pmatrix}\).

This example is simple because diagonal matrices make the eigenvalues easy to see: they are the diagonal entries.

Worked Example 2: A non-diagonal \(2\times 2\) matrix

Find the eigenvalues and eigenvectors of

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

Step 1: Find the characteristic equation

$$A-\lambda I=\begin{pmatrix}4-\lambda&1\\2&3-\lambda\end{pmatrix}$$ $$\det(A-\lambda I)=(4-\lambda)(3-\lambda)-2$$ $$=12-4\lambda-3\lambda+\lambda^2-2$$ $$=\lambda^2-7\lambda+10$$

Set equal to zero:

$$\lambda^2-7\lambda+10=0$$ $$ (\lambda-5)(\lambda-2)=0 $$

So the eigenvalues are

$$\lambda=5 \quad \text{and} \quad \lambda=2$$

Step 2: Find eigenvectors for \(\lambda=5\)

$$A-5I=\begin{pmatrix}-1&1\\2&-2\end{pmatrix}$$

Solve

$$\begin{pmatrix}-1&1\\2&-2\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}0\\0\end{pmatrix}$$

The first row gives

$$-x+y=0$$

so

$$y=x$$

Therefore eigenvectors are all non-zero vectors of the form

$$\begin{pmatrix}x\\x\end{pmatrix}$$

One simple eigenvector is

$$\mathbf{v}=\begin{pmatrix}1\\1\end{pmatrix}$$

Step 3: Find eigenvectors for \(\lambda=2\)

$$A-2I=\begin{pmatrix}2&1\\2&1\end{pmatrix}$$

Solve

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

The equation is

$$2x+y=0$$

so

$$y=-2x$$

Therefore eigenvectors are all non-zero vectors of the form

$$\begin{pmatrix}x\\-2x\end{pmatrix}$$

One simple eigenvector is

$$\mathbf{v}=\begin{pmatrix}1\\-2\end{pmatrix}$$

Conclusion:

  • Eigenvalue \(5\) has eigenvectors parallel to \(\begin{pmatrix}1\\1\end{pmatrix}\).
  • Eigenvalue \(2\) has eigenvectors parallel to \(\begin{pmatrix}1\\-2\end{pmatrix}\).

Worked Example 3: Repeated eigenvalue

Find the eigenvalues and eigenvectors of

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

Step 1: Find the eigenvalues

$$A-\lambda I=\begin{pmatrix}2-\lambda&1\\0&2-\lambda\end{pmatrix}$$ $$\det(A-\lambda I)=(2-\lambda)^2$$

Set equal to zero:

$$ (2-\lambda)^2=0 $$

So the only eigenvalue is

$$\lambda=2$$

This is called a repeated eigenvalue.

Step 2: Find eigenvectors

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

Solve

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

This gives

$$y=0$$

and \(x\) is free. So the eigenvectors are all non-zero vectors of the form

$$\begin{pmatrix}x\\0\end{pmatrix}$$

One example is

$$\mathbf{v}=\begin{pmatrix}1\\0\end{pmatrix}$$

This example is important because even though the eigenvalue is repeated, we do not get two different eigenvector directions. That can happen.

6. Quick check: Is a vector an eigenvector?

Sometimes you are given a matrix and a vector and asked whether the vector is an eigenvector.

To check:

  1. Multiply the matrix by the vector.
  2. See whether the result is a scalar multiple of the original vector.

Example: Let

$$A=\begin{pmatrix}2&0\\0&-1\end{pmatrix}, \quad \mathbf{v}=\begin{pmatrix}3\\0\end{pmatrix}$$

Compute:

$$A\mathbf{v}=\begin{pmatrix}2&0\\0&-1\end{pmatrix}\begin{pmatrix}3\\0\end{pmatrix}=\begin{pmatrix}6\\0\end{pmatrix}$$

Since

$$\begin{pmatrix}6\\0\end{pmatrix}=2\begin{pmatrix}3\\0\end{pmatrix}$$

the vector \(\mathbf{v}\) is an eigenvector, and the eigenvalue is \(2\).

Now try

$$\mathbf{w}=\begin{pmatrix}1\\1\end{pmatrix}$$

Then

$$A\mathbf{w}=\begin{pmatrix}2\\-1\end{pmatrix}$$

This is not a scalar multiple of \(\begin{pmatrix}1\\1\end{pmatrix}\), so \(\mathbf{w}\) is not an eigenvector.

7. Special cases and observations

  • Only square matrices can have eigenvalues and eigenvectors in this course.
  • If a matrix is diagonal, the eigenvalues are the entries on the diagonal.
  • Eigenvectors are never the zero vector.
  • If \(\mathbf{v}\) is an eigenvector, then any non-zero multiple of \(\mathbf{v}\) is also an eigenvector.
  • A matrix can have one, two, or more distinct eigenvalues depending on its size.
  • Some matrices have repeated eigenvalues.

8. Common mistakes to avoid

  • Using the zero vector as an eigenvector. This is not allowed.
  • Forgetting the identity matrix. When forming the characteristic equation, use \(A-\lambda I\), not \(A-\lambda\).
  • Making determinant errors. Be careful when expanding \(\det(A-\lambda I)\).
  • Stopping after finding eigenvalues. If asked for eigenvectors too, you must solve \((A-\lambda I)\mathbf{v}=\mathbf{0}\).
  • Giving only one eigenvector without noting multiples. Usually one example is enough, but remember all non-zero scalar multiples are also eigenvectors.

9. Why this matters

Eigenvalues and eigenvectors help describe how a transformation acts in its most natural directions. Instead of looking at how every vector changes, we focus on the special directions that do not turn.

This makes many matrix problems easier to understand. In later studies, eigenvalues and eigenvectors are used in science, engineering, computer graphics, and data analysis. For now, the key idea is that they reveal the important directions inside a linear transformation.

10. Final summary

An eigenvector of a square matrix \(A\) is a non-zero vector \(\mathbf{v}\) such that

$$A\mathbf{v}=\lambda\mathbf{v}$$

The scalar \(\lambda\) is the eigenvalue.

To find eigenvalues, solve

$$\det(A-\lambda I)=0$$

To find eigenvectors, substitute each eigenvalue into

$$\left(A-\lambda I\right)\mathbf{v}=\mathbf{0}$$

Eigenvectors show directions that stay parallel to themselves under a matrix transformation, while eigenvalues show how much those vectors are stretched, shrunk, or reversed.

Put what you read to the test

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