Solve a system of linear equations
Enter two or more simultaneous linear equations, one per line, then click Solve. For example, enter 2x + y = 5 and x - y = 1. Blank lines are ignored.
Enter equations the calculator can parse
Use single lowercase letters for variables. The parser accepts numbers, whitespace, decimal points, parentheses, and + - * / ^. It also understands implicit multiplication such as 2x and 3(x + 1).
- Enter 2 to 8 equations and use no more than 8 distinct variables.
- Give each equation exactly one
=sign and keep each line to 200 characters or fewer. - Use division for fractions, such as
1/2 x, or enter decimals such as0.5x. - Keep every equation linear. Products of variables such as
xyand nonlinear powers such asx^2are rejected. - Exponents must be non-negative whole numbers. The parser accepts
x^0andx^1; variable exponents above 1 are not supported.
Use the calculator controls
- Type your equations in the Linear equations (one per line, 2 or more) field.
- Click Solve to parse the system and calculate the result.
- Click Load example to insert the built-in example, or click Reset to clear the input and result.
- After solving, click Copy result to copy the plain-text equations, solution, and row-operation steps. Click Download result (.txt) to download the same text output.
Understand the result
The calculator writes the system as Ax = b, forms the augmented matrix [A | b], and applies Gaussian elimination with exact fraction arithmetic. The result panel shows the row-operation steps and final result; it does not render a separate augmented-matrix view. The copied or downloaded text also includes the equations you entered.
- A unique solution gives one value for each variable. Non-integer values include a decimal approximation; integer values are shown without one.
- Infinitely many solutions are reported when one or more variables are free.
- No solution is reported when the equations are inconsistent.
Know the calculator's limits
Use this tool for simultaneous linear equations. Errors can result from unsupported characters, malformed equations, unbalanced parentheses, invalid variable expressions, variables in denominators, division by zero, products of variables, nonlinear terms, too many equations or variables, or a system with no variables. The parser does not execute the input as code. It also does not apply units or unit conversion.
How equation processing works in the browser
This calculator's script parses and calculates the entered equations in your browser. The calculation script does not upload those equations. This describes the calculator's equation processing only.
Frequently Asked Questions
What is a system of linear equations?
A system of linear equations is a set of two or more linear equations sharing the same variables, such as 2x + y = 5 and x - y = 1. A solution is a set of values, one per variable, that satisfies every equation at the same time.
What method does this calculator use?
The calculator writes the system as an augmented matrix and applies Gaussian elimination with exact fraction arithmetic to reduce it to reduced row-echelon form, then reads off the solution. This is equivalent to solving the matrix equation Ax = b.
What happens if the system has no solution or infinitely many?
If elimination produces a row like 0 = 5, the system is inconsistent and has no solution. If fewer pivot columns exist than variables, one or more variables are free and the system has infinitely many solutions, expressed in terms of those free variables.
What notation can I type?
One equation per line, using single lowercase letters as variables (x, y, z, a, b, ...), numbers, the operators + - * / ^, and parentheses. Implicit multiplication like 2x is understood. Products of two variables (like xy) and variable exponents above 1 are rejected as nonlinear.
Does the calculator execute my input as code?
No. Each equation is parsed by a fixed, safe expression parser that only recognizes numbers, single-letter variables, and the operators + - * / ^ and parentheses - it never evaluates arbitrary code.