By Ben Beers • Updated Aug 30 2022
Fuse/Fuse/Getty Images
A matrix, or array, is a compact way to display the coefficients of a system of linear equations. It allows you to see the relationships between variables at a glance and serves as the foundation for solving the system using techniques such as Gaussian elimination.
Start by writing each equation on a separate line and number them for reference. For example:
[1] 2x + y + z = 18 [2] x + y + z = 15 [3] 3x − z + y = 7
Draw a square roughly 4 × 4 inches and divide it into three rows (one for each equation) and four columns (three for coefficients and one for constants). Make each column wide enough for a two‑digit number and separate the last column with a dotted line to distinguish the constants.
Populate the first three columns with the coefficients of each variable. Align the rows with the corresponding equations:
| Equation | x | y | z | Constant |
|---|---|---|---|---|
| 1 | 2 | 1 | 1 | 18 |
| 2 | 1 | 1 | 1 | 15 |
| 3 | 3 | 1 | −1 | 7 |
Place the constant terms (the numbers on the right‑hand side of each equation) in the final column. If an equation contains variables on the right, move them to the left using basic algebra so that every constant ends up on the right.
Once the matrix is complete, you can proceed to solve the system using row operations, matrix inversion, or other linear algebra techniques.