System of Linear Equations Calculator
Use this free system of linear equations calculator to solve 2×2, 3×3, or 4×4 systems using Gaussian elimination with complete step-by-step solutions and verification.
Solve systems of linear equations Ax = b using Gaussian elimination.
Solution
Augmented Matrix [A|b]
Verification
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. In matrix notation, the system \(Ax = b\) represents \(m\) equations in \(n\) unknowns, where \(A\) is the coefficient matrix, \(x\) is the vector of unknowns, and \(b\) is the constant vector.
For example, a 3×3 system looks like:
$$\begin{cases} a_{11}x + a_{12}y + a_{13}z = b_1 \\ a_{21}x + a_{22}y + a_{23}z = b_2 \\ a_{31}x + a_{32}y + a_{33}z = b_3 \end{cases}$$
Types of Solutions
A system of linear equations has exactly one of three outcomes:
- Unique Solution: The system has exactly one set of values that satisfies all equations. This occurs when \(\det(A) \neq 0\), meaning the coefficient matrix is invertible.
- Infinitely Many Solutions: The equations are consistent but dependent — there are free parameters in the solution. This happens when the rank of \(A\) is less than the number of unknowns.
- No Solution: The system is inconsistent — the equations contradict each other. Geometrically, this means the planes (or lines) do not share a common intersection point.
Work through examples by hand before relying on calculators. Understanding the process helps you catch errors that tools miss.
Solving by Gaussian Elimination
Gaussian elimination transforms the augmented matrix \([A|b]\) into row echelon form using elementary row operations. The algorithm:
- Form the augmented matrix by appending \(b\) to \(A\)
- Use row operations to create zeros below each pivot
- Continue until the matrix is in upper triangular (REF) form
- Use back-substitution to find each variable, starting from the last equation
For the system to have a unique solution, the coefficient matrix must have full rank — equal to the number of unknowns.
Cramer’s Rule
For small systems where \(\det(A) \neq 0\), Cramer’s Rule provides each variable directly:
$$x_i = \frac{\det(A_i)}{\det(A)}$$
where \(A_i\) is the matrix formed by replacing the \(i\)-th column of \(A\) with the vector \(b\). While elegant, Cramer’s Rule is computationally expensive for large systems and is mainly used for theoretical purposes or systems of 2–3 equations.
Mathematical concepts build on each other. If you are struggling with a topic, the real gap is usually one or two levels below where you think it is.
Matrix Inverse Method
When \(A\) is invertible, the solution can be computed as:
$$x = A^{-1}b$$
This is conceptually simple but computing \(A^{-1}\) is typically more work than Gaussian elimination. The inverse method is most useful when the same coefficient matrix \(A\) is used with multiple different right-hand sides \(b\).
Geometric Interpretation
Each linear equation in two variables represents a line in \(\mathbb{R}^2\), and in three variables represents a plane in \(\mathbb{R}^3\). The solution to the system is the intersection of these geometric objects:
- Two lines in 2D can intersect at a point (unique), be parallel (no solution), or overlap (infinite solutions)
- Three planes in 3D can meet at a point, along a line, or not at all — with various configurations possible
Applications of Linear Systems
- Engineering: Circuit analysis using Kirchhoff’s laws produces systems of linear equations
- Economics: Leontief input-output models and equilibrium price calculations
- Computer Science: Network flow problems, page ranking algorithms, and optimization
- Chemistry: Balancing chemical equations requires solving linear systems
- Data Fitting: Least-squares regression involves solving the normal equations \(A^T A x = A^T b\)
Homogeneous Systems
A homogeneous system \(Ax = 0\) always has the trivial solution \(x = 0\). It has non-trivial solutions if and only if \(\det(A) = 0\) (equivalently, rank(A) < number of unknowns). The set of all solutions forms a null space (or kernel) of the matrix \(A\).
How to check a linear-system solution
Substitute every reported variable into every original equation. Each equation must balance. This direct check is faster and more reliable than rerunning the same elimination steps.
A unique solution appears as a pivot in every variable column. A contradictory row such as \(0=5\) means no solution. A zero row with one or more free variables means infinitely many solutions.
Keep fractions exact during elimination. Premature decimal rounding can turn dependent equations into apparently different rows or create a small nonzero value where an exact zero belongs.
Common mistakes to avoid
- Swapping rows but losing a sign
- Performing a row operation on the coefficient side but not the constant column
- Assuming every square system has one solution
- Reporting variables without substituting them back
Useful linear algebra books and tools
For a linear system, compare elimination, substitution, and matrix methods instead of relying on a single output format. Matrix output becomes much easier to understand when you connect the row operations to vectors, transformations, and systems of equations.
- Learn the structure: Browse linear algebra textbooks and workbooks on Amazon. Prioritize books that explain geometric meaning alongside computational methods.
- Check numerical work: Browse scientific calculators on Amazon. A calculator can catch arithmetic slips, though it should not replace a written row-reduction trail.
As an Amazon Associate, I earn from qualifying purchases.
How do you solve a system of 3 equations with 3 unknowns?
Form the augmented matrix [A|b] and apply Gaussian elimination: use row operations to create zeros below each pivot, then back-substitute from the last equation upward. Alternatively, compute x = A⁻¹b if the determinant of A is non-zero.
What does it mean when a system has no solution?
A system has no solution when the equations are inconsistent — they contradict each other. In the augmented matrix, this appears as a row of the form [0 0 … 0 | c] where c ≠ 0, which represents the impossible equation 0 = c.
What is a homogeneous system?
A homogeneous system has the form Ax = 0, where all constant terms are zero. It always has at least the trivial solution x = 0. Non-trivial solutions exist when the determinant of A equals zero.
What is Cramer’s Rule?
Cramer’s Rule is a formula for solving systems where the coefficient matrix is square and invertible. Each variable x_i equals det(A_i)/det(A), where A_i is formed by replacing column i of A with the constants vector b.
How do you verify a solution to a linear system?
Substitute each variable’s value back into every original equation and confirm that both sides are equal. This calculator performs automatic verification by computing the left-hand side of each equation and comparing it to the right-hand side.
Can a system of 2 equations have 3 unknowns?
Yes, and such a system typically has infinitely many solutions (if consistent) because there are more unknowns than equations. The solution set forms a line or plane in the variable space, parameterized by one or more free variables.
What is the augmented matrix?
The augmented matrix [A|b] is formed by appending the constants vector b as an extra column to the coefficient matrix A. Row-reducing this augmented matrix simultaneously transforms the equations and constants, leading to the solution.
When should I use Gaussian elimination vs. matrix inverse?
Gaussian elimination is generally more efficient and works even when the matrix is singular. The matrix inverse method (x = A⁻¹b) is preferable when you need to solve multiple systems with the same coefficient matrix but different right-hand sides.