← All visuals

Straight-line graphs: y = mx + c, parallel and perpendicular lines

Drag points A and B on the coordinate grid (or use the sliders) to find the gradient, equation of the line, midpoint, segment length, and parallel or perpendicular lines through a point.

Presets:
Show companion line:

Coordinates of A(x₁, y₁) and B(x₂, y₂) (drag on graph or adjust below)

−2
−1
4
2

Equation of line AB, midpoint & segment length

Parallel & perpendicular lines (m₁ × m₂ = −1)