# System of linear equations solver > How do you solve a system of linear equations? Solve two or three linear equations together and see where the lines cross. Solve two equations in x and y or three in x, y and z: the unique solution by Cramer's rule, or why there is none or infinitely many, with the lines drawn. - Page: https://how.box/linear-system/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/linear-system/?s={s}&a1={a1}&b1={b1}&c1={c1}&d1={d1}&a2={a2}&b2={b2}&c2={c2}&d2={d2}&a3={a3}&b3={b3}&c3={c3}&d3={d3} - `s` (2 or 3): Number of equations and unknowns: 2 or 3. Example: `2`. - `a1` (number -1e6 to 1e6): x coefficient, equation 1. Example: `2`. - `b1` (number -1e6 to 1e6): y coefficient, equation 1. Example: `1`. - `c1` (number -1e6 to 1e6): z coefficient, equation 1. Example: `1`. - `d1` (number -1e6 to 1e6): Right-hand side, equation 1. Example: `5`. - `a2` (number -1e6 to 1e6): x coefficient, equation 2. Example: `1`. - `b2` (number -1e6 to 1e6): y coefficient, equation 2. Example: `-1`. - `c2` (number -1e6 to 1e6): z coefficient, equation 2. Example: `2`. - `d2` (number -1e6 to 1e6): Right-hand side, equation 2. Example: `1`. - `a3` (number -1e6 to 1e6): x coefficient, equation 3. Example: `1`. - `b3` (number -1e6 to 1e6): y coefficient, equation 3. Example: `1`. - `c3` (number -1e6 to 1e6): z coefficient, equation 3. Example: `1`. - `d3` (number -1e6 to 1e6): Right-hand side, equation 3. Example: `4`. Example answer: https://how.box/linear-system/?s=2&a1=2&b1=1&c1=1&d1=5&a2=1&b2=-1&c2=2&d2=1&a3=1&b3=1&c3=1&d3=4 A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `linear_system_solve`: Solves a_i·x + b_i·y (+ c_i·z) = d_i: size "2" (default; equations 1 and 2 in x and y) or "3" (equations 1–3 in x, y, z). - Page only: runs on this page (WebMCP), not over MCP. ## How it works A system of linear equations asks for values that make every equation true at once. With two unknowns, each equation is a straight line, and the solution is where the lines cross. Two lines either cross once, run parallel and never meet (no solution), or lie on top of each other (infinitely many solutions). With three unknowns, each equation is a flat plane in space. The determinant D of the numbers in front of the variables decides which case you have: if D is not 0 there is exactly one solution, and Cramer's rule gives it as x = Dₓ / D, y = D_y / D, where Dₓ is D with the x column replaced by the right-hand sides. For 2x + y = 5 and x − y = 1: D = 2·(−1) − 1·1 = −3, Dₓ = 5·(−1) − 1·1 = −6 and D_y = 2·1 − 5·1 = −3, so x = 2 and y = 1. When D = 0, the ranks of the matrix with and without the right-hand sides tell the rest: different ranks mean the equations contradict each other, equal ranks mean they repeat each other. Results are rounded to six significant digits. Sources: OpenStax College Algebra 2e, sections 7.1, 7.2 and 7.8. ## FAQ **How do I enter an equation with variables on both sides?** Move all variable terms to the left and the constant terms to the right first. Enter a coefficient of zero for any variable that is absent. **Which method should I use by hand: substitution, elimination or Cramer's rule?** All give the same answer. Substitution is quick when one variable has the coefficient 1, elimination works well for any system, and Cramer's rule is a neat formula for two or three unknowns. **How can I check the solution?** Substitute the reported values into every original equation. Each left-hand side should equal its right-hand side, allowing for rounding in the displayed solution. **Can I solve more than three equations here?** No, this solver handles two or three unknowns. Larger systems follow the same rules and are solved by Gaussian elimination. **Can I enter fractions as coefficients?** Convert them to decimals, or multiply the whole equation by a common denominator first. Multiply the right-hand side too so that the equation stays equivalent. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)