M
Mathover
Understand every step.
Start solving
← Formula Library

Algebra formulas

Solving linear and quadratic equations, the discriminant, and coordinate formulas for distance, midpoint and slope.

These pages explain formulas for reference. They don't mean Mathover can solve every problem that uses them — interactive calculations are limited to the linked tools.

Solving a linear equation

ax + b = c ⇒ x = (c − b) ÷ a

Undo the operations on x in reverse order: subtract b from both sides, then divide both sides by a.

Symbols

a
coefficient of x
b
constant on the left
c
constant on the right

When it applies

a must not be 0. If a = 0 the equation has either no solution (b ≠ c) or every x works (b = c).

Worked example

Solve 2x + 5 = 17.

  1. 1.Subtract 5: 2x = 12
  2. 2.Divide by 2: x = 6
  3. 3.Check: 2(6) + 5 = 17 ✓

Answer: x = 6

Try it in the Linear Equation Solver tool →

Quadratic formula

x = (−b ± √(b² − 4ac)) ÷ (2a)

Gives the solutions of any quadratic equation written in the form ax² + bx + c = 0.

Symbols

a
coefficient of x² (a ≠ 0)
b
coefficient of x
c
constant term

When it applies

The equation must be rearranged to equal 0 first. Real solutions exist only when b² − 4ac ≥ 0.

Worked example

Solve x² − 5x + 6 = 0.

  1. 1.a = 1, b = −5, c = 6
  2. 2.b² − 4ac = 25 − 24 = 1
  3. 3.x = (5 ± √1) ÷ 2 = (5 ± 1) ÷ 2
  4. 4.x = 6 ÷ 2 = 3 or x = 4 ÷ 2 = 2

Answer: x = 3 or x = 2

Try it in the Quadratic Equation Solver tool →

Discriminant

Δ = b² − 4ac

The part under the square root in the quadratic formula. Its sign tells you how many real solutions there are before you solve.

Symbols

a, b, c
coefficients of ax² + bx + c = 0
Δ
the discriminant

When it applies

Δ > 0: two different real roots. Δ = 0: one repeated real root. Δ < 0: no real roots.

Worked example

How many real roots does 4x² + 4x + 1 = 0 have?

  1. 1.Δ = 4² − 4(4)(1) = 16 − 16 = 0
  2. 2.Δ = 0, so there is one repeated root
  3. 3.x = −b ÷ 2a = −4 ÷ 8 = −1/2

Answer: One repeated root, x = −1/2

Try it in the Quadratic Equation Solver tool →

Distance between two points

d = √((x₂ − x₁)² + (y₂ − y₁)²)

Pythagoras applied to the horizontal and vertical gaps between the two points.

Symbols

(x₁, y₁), (x₂, y₂)
the two points
d
straight-line distance

When it applies

Points on a flat (Cartesian) plane with the same units on both axes.

Worked example

Find the distance from (1, 2) to (7, 10).

  1. 1.x₂ − x₁ = 6, y₂ − y₁ = 8
  2. 2.6² + 8² = 36 + 64 = 100
  3. 3.√100 = 10

Answer: d = 10 units

Reference only — no interactive Mathover tool for this formula yet.

Midpoint of a line segment

M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)

The midpoint's coordinates are the averages of the endpoints' coordinates.

Symbols

(x₁, y₁), (x₂, y₂)
the endpoints
M
the midpoint

When it applies

Any two points on a Cartesian plane.

Worked example

Find the midpoint of (−2, 5) and (6, 1).

  1. 1.x: (−2 + 6) ÷ 2 = 4 ÷ 2 = 2
  2. 2.y: (5 + 1) ÷ 2 = 6 ÷ 2 = 3

Answer: M = (2, 3)

Reference only — no interactive Mathover tool for this formula yet.

Slope (gradient) of a line

m = (y₂ − y₁) ÷ (x₂ − x₁)

Rise over run: how much y changes for each 1 unit increase in x.

Symbols

m
slope
(x₁, y₁), (x₂, y₂)
two points on the line

When it applies

x₁ ≠ x₂. A vertical line (x₁ = x₂) has an undefined slope.

Worked example

Find the slope of the line through (1, 3) and (4, 12).

  1. 1.Rise = 12 − 3 = 9
  2. 2.Run = 4 − 1 = 3
  3. 3.m = 9 ÷ 3 = 3

Answer: m = 3

Reference only — no interactive Mathover tool for this formula yet.

Equation of a straight line

y = mx + c

Every non-vertical straight line can be written this way. Substitute a known point to find c once you know m.

Symbols

m
slope
c
y-intercept (where the line crosses the y-axis)

When it applies

Non-vertical lines. Vertical lines have the form x = k.

Worked example

Find the line with slope 3 through the point (2, 11).

  1. 1.11 = 3(2) + c
  2. 2.11 = 6 + c
  3. 3.c = 5

Answer: y = 3x + 5

Reference only — no interactive Mathover tool for this formula yet.