Linear Equation Solver Formula

Understand the math behind the linear equation solver. Each variable explained with a worked example.

Formulas Used

X

x = a != 0 ? (c - b) / a : 0

Y Intercept

y_intercept = b

Variables

VariableDescriptionDefault
aCoefficient a3
bConstant b7
cEquals c22

How It Works

How to Solve a Linear Equation

Formula

Given ax + b = c, solve for x:

x = (c - b) / a

1. Subtract b from both sides: ax = c - b 2. Divide both sides by a: x = (c - b) / a

This works for any linear equation with a single unknown, as long as a is not zero.

Worked Example

Solve 3x + 7 = 22.

a = 3b = 7c = 22
  1. 013x + 7 = 22
  2. 023x = 22 - 7 = 15
  3. 03x = 15 / 3 = 5

Ready to run the numbers?

Open Linear Equation Solver