01 / 21

Matrix Equations for Systems

Learn how to translate systems of linear equations into the compact form \( A\mathbf{x} = \mathbf{b} \) and solve them using matrix methods.

Finite Mathematics

What Is a System of Linear Equations?

A system of linear equations is a collection of two or more linear equations involving the same set of variables. A solution is any assignment of values to the variables that satisfies every equation simultaneously.

In Finite Mathematics, systems model resource allocation, network flows, and economic equilibria: any situation with multiple constraints on multiple unknowns.

The Three Pieces: \(A\), \(\mathbf{x}\), \(\mathbf{b}\)

Coefficient Matrix \(A\)
The rectangular array of all the coefficients from the left-hand sides of the equations, arranged row by row.
Variable Vector \(\mathbf{x}\)
A column vector listing each unknown variable: \(\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \end{bmatrix}\).
Constant Vector \(\mathbf{b}\)
A column vector of the right-hand side constants from each equation.

Visualizing \( A\mathbf{x} = \mathbf{b} \)

\(2\)
\(3\)
\(1\)
\(-1\)
\(A\)
\(x\)
\(y\)
\(\mathbf{x}\)
\(=\)
\(7\)
\(1\)
\(\mathbf{b}\)
Coefficients Unknowns Constants

The system \( 2x + 3y = 7,\; x - y = 1 \) becomes the single matrix equation shown above. Multiplying \(A\) by \(\mathbf{x}\) and setting the result equal to \(\mathbf{b}\) recovers every original equation.

Core Rule: Matrix Multiplication

When you multiply \( A\mathbf{x} \), you take the dot product of each row of \( A \) with the column vector \( \mathbf{x} \). Each dot product produces one equation of the original system.

The Matrix Equation Theorem

This means the system has a solution if and only if \( \mathbf{b} \) can be written as a linear combination of the columns of \( A \).

Solving via \( A^{-1} \)

When \( A \) is a square matrix and \( \det(A) \neq 0 \), the inverse \( A^{-1} \) exists and provides a direct formula for the solution:

Unique Solution
\( \det(A) \neq 0 \): inverse exists, exactly one solution \( \mathbf{x} = A^{-1}\mathbf{b} \).
No Inverse
\( \det(A) = 0 \): no inverse, system has either no solution or infinitely many.

\( A\mathbf{x} = \mathbf{b} \) vs. Augmented Matrix

\( A\mathbf{x} = \mathbf{b} \) \( [A \mid \mathbf{b}] \)
Form Matrix equation Single augmented matrix
Solving method Multiply by \( A^{-1} \) Row reduction (Gauss-Jordan)
Requires \( A \) square? Yes (for inverse method) No: works for any \( m \times n \)
Best when Solving many systems with same \( A \) One-off system or non-square

How to Set Up \( A\mathbf{x} = \mathbf{b} \)

1
Identify the unknowns. List every variable and decide on an ordering: \( x_1, x_2, \ldots, x_n \).
2
Write each equation in standard form. Move all variable terms to the left and all constants to the right: \( a_1 x_1 + a_2 x_2 + \cdots = b \).
3
Read off the coefficients row by row to build the matrix \( A \). Missing variables get a coefficient of 0.
4
Form \( \mathbf{x} \) and \( \mathbf{b} \). Write the column vectors and confirm the dimensions: \( A \) is \( m \times n \), \( \mathbf{x} \) is \( n \times 1 \), \( \mathbf{b} \) is \( m \times 1 \).
5
Solve. If \( A \) is square and invertible, compute \( \mathbf{x} = A^{-1}\mathbf{b} \). Otherwise, use row reduction on \( [A \mid \mathbf{b}] \).

Example 1: \( 2 \times 2 \) System

Problem: Solve the following system using a matrix equation.

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

Example 2: \( 3 \times 3 \) System

Problem: A company makes products \( P_1 \), \( P_2 \), \( P_3 \). Given the constraints below, write the matrix equation.

Example 3: Missing Variables

Problem: Write the matrix equation for: $$ 5x + z = 12 $$ $$ -2y + 3z = 7 $$ $$ x + y = 4 $$

The \( 2 \times 2 \) Inverse Formula

1
Swap the main diagonal entries \( a \) and \( d \).
2
Negate the off-diagonal entries \( b \) and \( c \).
3
Divide every entry by \( \det(A) = ad - bc \).

This formula works only for \( 2 \times 2 \) matrices. For larger matrices, use row reduction or technology.

When Does a Solution Exist?

Unique Solution
\( \det(A) \neq 0 \). The lines (or planes) intersect at exactly one point. Use \( \mathbf{x} = A^{-1}\mathbf{b} \).
Infinitely Many
\( \det(A) = 0 \) but the system is consistent. The equations describe overlapping lines or planes.
No Solution
\( \det(A) = 0 \) and the system is inconsistent. The lines or planes are parallel with no common point.
Unique Infinite None
\(\det(A) \neq 0\)
\(\det(A) = 0\), consistent
\(\det(A) = 0\), inconsistent

Common Mistakes

✕ Wrong Variable Order
Listing variables in a different order across equations scrambles the columns of \( A \). Always pick one order and stick with it.
✕ Forgetting Zeros
If a variable is absent from an equation, its coefficient is 0, not blank. A missing zero shifts all columns and produces a wrong matrix.
✕ Multiplying in Wrong Order
Matrix multiplication is not commutative: \( A^{-1}\mathbf{b} \neq \mathbf{b}A^{-1} \). Always multiply \( A^{-1} \) on the left.

Summary of Approaches

Matrix Inverse Row Reduction Cramer's Rule
Equation form \( \mathbf{x} = A^{-1}\mathbf{b} \) \( [A \mid \mathbf{b}] \to \text{RREF} \) \( x_i = \frac{\det(A_i)}{\det(A)} \)
Requires square \( A \)? Yes No Yes
Requires \( \det(A) \neq 0 \)? Yes No Yes
Best for Multiple \( \mathbf{b} \) vectors General systems Small systems (2-3 vars)

Question 1 of 5

Which matrix equation represents the system
\( 3x + 2y = 5 \) and \( x - 4y = 9 \)?

Question 2 of 5

Given \( A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix} \), what is \( \det(A) \)?

Question 3 of 5

If the system \( 4x + y = 6 \) and \( 2x + 3y = 8 \) is written as \( A\mathbf{x} = \mathbf{b} \), what is \( \mathbf{x} = A^{-1}\mathbf{b} \)?

Question 4 of 5

A system has three equations and three unknowns, but \( \det(A) = 0 \). What can you conclude?

Question 5 of 5

The system \( 2x + z = 5,\; y - 3z = 1,\; x + y = 4 \) is written as \( A\mathbf{x} = \mathbf{b} \). What is the second row of \( A \)?