standarddeviationcalculator.net

Updated Free · runs in your browser

Math

Linear equation calculator

Type a single linear equation and get each step from expanding the brackets to checking the answer, or switch to a 2 × 2 or 3 × 3 system and solve it by elimination or Cramer's rule. The calculator also tells you when there is no solution or infinitely many.

Brackets, fractions such as x/2 and implicit multiplication (2x) are fine. Any single letter can be the unknown.

Solution x = 9
x as a decimal9
Left side simplified3x − 2
Right side simplified2x + 7
Both sides at the solution25
Show the working, step by step
  1. Start from the equation as typed.

    3(x − 2) + 4 = 2x + 7

  2. Expand brackets and collect like terms on each side.

    3x − 2 = 2x + 7

  3. On both sides, subtract 2x and add 2, so the x terms are on the left and the numbers on the right.

    3x − 2x = 7 − (−2) x = 9

  4. Check by substituting x = 9 into the original equation.

    Left: 3(x − 2) + 4 = 25 Right: 2x + 7 = 25

What makes an equation linear

A linear equation has every unknown to the first power only: no x², no √x, no 1/x and no products such as xy. Any linear equation in one unknown can be rearranged to

ax = b ⇒ x = b / a (a ≠ 0)

Brackets and fractions are allowed as long as the unknown is not in a denominator. The equation x/2 + 1/3 = 5 is linear (its solution is x = 28/3); 1/x = 4 is not, until you multiply through by x.

A worked example

The calculator's default is 3(x − 2) + 4 = 2x + 7.

  1. Expand and collect: 3x − 6 + 4 = 3x − 2, so the equation is 3x − 2 = 2x + 7.
  2. Subtract 2x from both sides and add 2 to both sides: 3x − 2x = 7 + 2.
  3. Collect: x = 9.
  4. Check: 3(9 − 2) + 4 = 25 and 2 × 9 + 7 = 25. Both sides agree.

Systems of equations

Choose a 2 × 2 or 3 × 3 system and enter the coefficients row by row, with 0 for a missing variable. The 2 × 2 default is 2x + 3y = 13 and x − y = −1.

  • Elimination: R₂ → R₂ − (1/2)R₁ removes x and leaves −(5/2)y = −15/2, so y = 3. Back-substituting, 2x + 9 = 13 gives x = 2.
  • Cramer's rule: D = 2 × (−1) − 3 × 1 = −5, Dx = 13 × (−1) − 3 × (−1) = −10 and Dy = 2 × (−1) − 13 × 1 = −15, so x = −10/−5 = 2 and y = −15/−5 = 3.

The 3 × 3 default (x + y + z = 6, 2x − y + z = 3, x + 2y − z = 2) has D = 7, Dx = 7, Dy = 14 and Dz = 21, so x = 1, y = 2 and z = 3.

How many solutions?

After eliminationDeterminantSolutions2 × 2 picture
Every unknown has a pivotD ≠ 0Exactly oneLines cross once
A row reads 0 = (non-zero)D = 0NoneParallel lines
A row reads 0 = 0D = 0Infinitely manyThe same line twice

For infinitely many solutions the calculator gives the general solution in terms of a free parameter t. For x + 2y = 3 and 2x + 4y = 6 that is x = 3 − 2t, y = t.

Common mistakes

  • Expanding only the first term of a bracket. 3(x − 2) is 3x − 6, not 3x − 2.
  • Changing the sign on only one side. Whatever you add or subtract, do it to both sides.
  • Dividing by a negative and losing the sign. −4x = 8 gives x = −2.
  • Misaligned columns in a system. Keep x, y and z in the same order in every equation, and use 0 for a missing term.

Common questions

How do you solve a linear equation step by step?

Expand any brackets, collect like terms on each side, move every term containing the unknown to one side and every number to the other, then divide by the coefficient of the unknown. For 3(x − 2) + 4 = 2x + 7: 3x − 2 = 2x + 7, so 3x − 2x = 7 + 2, and x = 9. Substituting back gives 25 on both sides.

When does a linear equation have no solution or infinitely many?

When the unknown cancels out. If what remains is true, such as 2 = 2 from 2(y + 1) = 2y + 2, the equation is an identity and every value works. If what remains is false, such as 0 = 1 from 2x = 2x + 1, it is a contradiction and no value works.

What is Cramer’s rule?

For a square system with a non-zero coefficient determinant D, each unknown equals a ratio of determinants: x = Dx/D, where Dx is D with the x column replaced by the constants. For 2x + 3y = 13 and x − y = −1, D = −5, Dx = −10 and Dy = −15, so x = 2 and y = 3. When D = 0 the rule gives no answer, and elimination has to decide between no solution and infinitely many.

Is elimination or Cramer’s rule better?

Elimination is less work by hand for three or more unknowns and handles the D = 0 cases directly. Cramer’s rule is tidy for 2 × 2 systems and gives each unknown independently, which is handy when you only need one of them. Both give identical answers when the solution is unique.

What does a 2 × 2 system look like on a graph?

Each equation is a straight line. One crossing point means one solution; parallel lines (same slope, different intercept) mean no solution; the same line twice means infinitely many. The graph under the calculator draws both lines and marks the intersection.