Mathwords logoMathwords

Matrix Equation — Definition, Formula & Examples

A matrix equation is a way of writing a system of linear equations in the compact form Ax=bA\mathbf{x} = \mathbf{b}, where AA is the matrix of coefficients, x\mathbf{x} is the column vector of unknowns, and b\mathbf{b} is the column vector of constants.

Given an m×nm \times n coefficient matrix AA, a vector xRn\mathbf{x} \in \mathbb{R}^n, and a vector bRm\mathbf{b} \in \mathbb{R}^m, the matrix equation Ax=bA\mathbf{x} = \mathbf{b} is the equation whose solutions are exactly the solutions to the corresponding system of mm linear equations in nn unknowns.

Key Formula

Ax=bA\mathbf{x} = \mathbf{b}
Where:
  • AA = The m × n coefficient matrix
  • x\mathbf{x} = The n × 1 column vector of unknowns
  • b\mathbf{b} = The m × 1 column vector of constants

How It Works

Start with a system of linear equations. Collect all the coefficients into a matrix AA, all the unknowns into a column vector x\mathbf{x}, and all the constants on the right-hand side into a column vector b\mathbf{b}. The matrix product AxA\mathbf{x} reproduces the left-hand side of every equation simultaneously, so solving Ax=bA\mathbf{x} = \mathbf{b} is equivalent to solving the original system. If AA is square and invertible, the unique solution is x=A1b\mathbf{x} = A^{-1}\mathbf{b}. Otherwise, you can row-reduce the augmented matrix [Ab][A \mid \mathbf{b}] to find solutions or determine that none exist.

Worked Example

Problem: Write the system 2x + 3y = 8 and x − y = 1 as a matrix equation and solve it.
Write in matrix form: Identify A, x, and b from the system.
[2311][xy]=[81]\begin{bmatrix} 2 & 3 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 8 \\ 1 \end{bmatrix}
Find A inverse: For a 2×2 matrix, use the formula with determinant det(A) = 2(−1) − 3(1) = −5.
A1=15[1312]=[15351525]A^{-1} = \frac{1}{-5}\begin{bmatrix} -1 & -3 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} \frac{1}{5} & \frac{3}{5} \\ \frac{1}{5} & -\frac{2}{5} \end{bmatrix}
Compute x = A⁻¹b: Multiply the inverse by b to get the solution vector.
x=[15351525][81]=[11565]\mathbf{x} = \begin{bmatrix} \frac{1}{5} & \frac{3}{5} \\ \frac{1}{5} & -\frac{2}{5} \end{bmatrix}\begin{bmatrix} 8 \\ 1 \end{bmatrix} = \begin{bmatrix} \frac{11}{5} \\ \frac{6}{5} \end{bmatrix}
Answer: x=115x = \frac{11}{5} and y=65y = \frac{6}{5}.

Why It Matters

Matrix equations are the standard framework for solving systems of equations in linear algebra courses and in applied fields like engineering, economics, and computer graphics. Tools such as Cramer's Rule and matrix inversion only make sense once a system is expressed in this form.

Common Mistakes

Mistake: Writing xA = b instead of Ax = b, or multiplying the inverse on the wrong side.
Correction: Matrix multiplication is not commutative. To isolate x, left-multiply both sides by A⁻¹: x = A⁻¹b, not bA⁻¹.