Linear Equation Solver
Solve systems of linear equations with this free online calculator. Enter the coefficients and constants to find the solution, see the reduced row echelon form, and follow the Gauss-Jordan elimination steps. The solver supports systems with one or multiple solutions, including inconsistent systems with no solution.
System of Linear Equations Calculator
Choose the number of equations and unknown variables. Enter each coefficient and the constant on the right side of the equation. Fractions such as 2/3 are accepted.
What Is a Linear Equation Solver?
A linear equation solver finds values for unknown variables that make one or more linear equations true. When several equations contain the same variables, they form a system of linear equations. The solution must satisfy every equation in the system.
For example, a system with two unknowns can be written as:
a₂x + b₂y = c₂
A system can have one solution, infinitely many solutions, or no solution. This calculator uses matrix row reduction to determine which case applies and to calculate the solution when one exists.
How to Use This Linear Equation Calculator
- Select how many equations your system contains.
- Select the number of unknown variables.
- Enter the coefficient of each variable in the corresponding cell.
- Enter the constant term in the final column.
- Click Solve system to calculate the result.
- Review the solution, matrix ranks, RREF matrix, and elimination steps.
Enter a zero when a variable is missing from an equation. For example, the equation 2x + 5 = 9 can be entered as 2x + 0y = 4 in a two-variable system. You can enter integers, decimals, fractions, and scientific notation.
Matrix Form of a Linear System
A system of linear equations can be represented compactly using the matrix equation:
Here:
- A is the coefficient matrix containing the variable coefficients.
- x is the column vector of unknown variables.
- b is the column vector containing the constants.
The augmented matrix combines the coefficient matrix and constant vector into one matrix, written as [A | b]. Row operations can then simplify the system without changing its solution set.
How the Gauss-Jordan Method Works
This calculator applies Gauss-Jordan elimination to the augmented matrix. The goal is to transform the matrix into reduced row echelon form, where each pivot is 1 and all other entries in a pivot column are zero.
The method uses three elementary row operations:
- Row interchange: Swap two rows.
- Row scaling: Multiply a row by a nonzero number.
- Row replacement: Add a multiple of one row to another row.
The calculator selects a large available pivot in each column before performing elimination. This partial-pivoting approach helps reduce numerical errors in floating-point calculations.
Three Possible Results of a Linear System
1. Unique solution
A system has a unique solution when the equations are consistent and every variable is determined. For a system with n variables, this occurs when the coefficient matrix has rank n and the augmented system is consistent.
2. Infinitely many solutions
A consistent system has infinitely many solutions when at least one variable is free. The free variable or variables can be assigned arbitrary parameter values, and the remaining variables are expressed in terms of those parameters.
3. No solution
A system has no solution when its equations contradict one another. During row reduction, this is identified by a row whose variable coefficients are all zero but whose constant is nonzero. It represents an impossible equation such as 0 = 5.
Rank and the Existence of Solutions
The rank of a matrix is the number of pivot positions in its row echelon form. Comparing the rank of the coefficient matrix A with the rank of the augmented matrix [A | b] determines whether a system is consistent.
If the two ranks are different, the system has no solution. If they are equal, the system is consistent. When this common rank equals the number of variables, the solution is unique; otherwise, there are infinitely many solutions.
Frequently Asked Questions
What is a linear equation solver?
A linear equation solver calculates the values of unknown variables in one or more linear equations. This calculator uses matrix row reduction to solve systems and classify their solutions.
Can I solve more equations than variables?
Yes. The calculator accepts rectangular systems with different numbers of equations and variables. Depending on the coefficients and constants, such a system may have one solution, infinitely many solutions, or no solution.
Can a system of linear equations have no solution?
Yes. A system has no solution when its equations are inconsistent. In reduced row echelon form, this appears as a row with zero variable coefficients and a nonzero constant.
What does infinitely many solutions mean?
It means that at least one variable is free. The other variables can be expressed in terms of one or more parameters, and different parameter values give different valid solutions.
Can I enter fractions and decimal numbers?
Yes. You can enter integers, decimals, fractions such as 3/4 and -2/5, and scientific notation such as 1e-3.
What is the difference between Gaussian and Gauss-Jordan elimination?
Gaussian elimination transforms a matrix into row echelon form, usually eliminating entries below each pivot. Gauss-Jordan elimination continues until the matrix is in reduced row echelon form, eliminating entries both above and below each pivot.
Does this calculator work for non-square systems?
Yes. It supports systems with different numbers of equations and variables. The number of equations does not need to equal the number of unknowns.
Is the solution always an integer?
No. A solution can contain integers, fractions, or decimal values. The calculator displays simple rational approximations when the computed value is sufficiently close to a fraction with a small denominator.
Related Matrix and Linear Algebra Calculators
Explore other tools for matrix calculations and solving linear systems: