Linear Algebra

System of Linear Equations Solver

Solve three equations in x, y, and z using row reduction with visible elimination steps.

x

2.000000

y

3.000000

z

-1.000000

Swap R1 with R2
Normalize R1
Eliminate column 1 from R2
Eliminate column 1 from R3
Swap R2 with R3
Normalize R2
Eliminate column 2 from R1
Eliminate column 2 from R3
Normalize R3
Eliminate column 3 from R1
Eliminate column 3 from R2

Solving Linear Systems with Gaussian Elimination

A system of linear equations asks for unknown values that satisfy several equations at the same time. In engineering, these systems appear in circuit analysis, statics, heat flow, control systems, calibration, regression, and numerical simulation. A three-variable system can be written as a matrix equation A x = b, where A contains coefficients, x contains unknowns, and b contains right-hand-side constants. Gaussian elimination solves the system by transforming the augmented matrix into a simpler equivalent form.

The augmented matrix places the coefficients and constants in one table. For equations 2x + y - z = 8, -3x - y + 2z = -11, and -2x + y + 2z = -3, the rows are [2 1 -1 8], [-3 -1 2 -11], and [-2 1 2 -3]. Row operations do not change the solution if they are performed correctly. You may swap rows, multiply a row by a nonzero constant, or add a multiple of one row to another row.

Manual Elimination Steps

The goal is to create pivots and eliminate entries above and below each pivot. Start in the first column. Choose a nonzero pivot, often the row with the largest absolute value for numerical stability. Normalize the pivot row so the pivot becomes 1. Then subtract suitable multiples of that row from the other rows to make their first column entries zero. Move to the second column and repeat, then the third. When the left side becomes the identity matrix, the right side contains x, y, and z.

For the sample system, elimination produces x = 2, y = 3, and z = -1. A manual check is simple: substitute those values back into the original equations. The first equation gives 2(2) + 3 - (-1) = 8. The second gives -3(2) - 3 + 2(-1) = -11. The third gives -2(2) + 3 + 2(-1) = -3. Because all three match, the solution is correct.

Pivoting and Numerical Stability

Pivot choice matters when calculations use floating-point arithmetic. Dividing by a very small pivot can amplify rounding error. Partial pivoting swaps the largest available row into the pivot position, reducing that risk for many practical systems. This is why numerical libraries use pivoting strategies rather than blindly eliminating from top to bottom. In exact hand calculations, pivoting is still useful because it avoids awkward fractions when a better row is available.

A zero pivot indicates that the current equations do not provide an independent constraint in that column. The system may have no solution, infinitely many solutions, or require row swaps to continue. If an entire row becomes zero on the coefficient side but has a nonzero right-hand side, the equations are inconsistent. If a row becomes all zeros including the right side, one equation was redundant. This calculator reports when a unique solution cannot be found with the supplied 3x3 coefficient matrix.

Where Solving Linear Systems with Gaussian Elimination Appears in Practice

Nodal circuit analysis creates linear systems where node voltages are unknowns and conductances form the coefficient matrix. Structural statics creates systems where forces and moments must balance. Calibration problems solve for scale factors and offsets. Robotics and graphics solve coordinate relationships. In finite element methods, very large sparse linear systems describe physical fields. The same row-reduction idea appears underneath more advanced algorithms, even when software uses optimized matrix factorizations.

Manual solving remains valuable because it exposes the structure of the problem. If changing one equation dramatically changes the solution, the system may be poorly conditioned. If two equations are almost multiples of each other, the result may be sensitive to measurement noise. If units are mixed, coefficients can differ by many orders of magnitude and create numerical trouble. Good engineering analysis checks the math, the units, and the physical meaning of the solution.

Use this solver for transparent 3-variable systems. Enter each row as coefficients followed by the right-hand side, review the elimination steps, and substitute the result into the original equations. For larger systems, use a numerical library, but keep the same mental model: row operations preserve the solution while making the relationships easier to read.

Units should be handled before solving. If one row represents volts, another represents millivolts, and a third represents amps, the coefficients may be numerically correct but physically inconsistent. Scale equations so each row expresses the intended relationship in compatible units. After solving, check whether the signs and magnitudes make physical sense. A negative resistance, impossible force direction, or voltage outside the supply rails may reveal a modeling mistake even when the algebra is internally consistent.

In design reviews, the augmented matrix is also a communication tool. It shows which variables interact and which equations constrain them. Sparse rows indicate local relationships; dense rows indicate coupled behavior. Before trusting the solution, confirm that every unknown appears in enough independent equations and that the right-hand side values came from the same operating condition. The solver can process numbers, but engineering judgment decides whether those numbers describe the real system.

Continue exploring