Opening the book…
MATLAB is very good at solving systems of linear equations when we write them in matrix form:
\(A*x = b\)
- A is the coefficient matrix.
- x is the column vector of unknowns.
- b is the column vector of constants from the right-hand side of the equations.
For example, for the system:
\(4*x1 - 2*x2 + x3 = 7\)
\(x1 + x2 + 5*x3 = 10\)
\(-2*x1 + 3*x2 - x3 = 2\)
the coefficient matrix and constant vector are:
A = [4 -2 1; 1 1 5; -2 3 -1];
b = [7; 10; 2];
Notice that b is a column vector. This is important because x will also be a column vector.
This page titled 13.17: Writing a Linear System as Ax = b was last modified on Tue, 30 Jun 2026 02:11:59 GMT and is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Zara Noroozi.
The book could not be loaded just now.