The general equation of a line has the form
ax + by + c = 0
where a and b cannot be simultaneously 0.
y = y0t + yf
x = x0t + xf
![]() |
For any non-vertical line
or, if you know the slope φ and b, then
|
Let rp be the radus-vector of a point p laying on the line. Let also d be the directional vector of the line : a radius vector with the same slope as the line and (usually) with a norm (length) of 1.

Then the equation of the line in vector form can be expressed as:
r(t) = rp + d.t, where t varies continuously between -∞ and +∞. This equation is valid in any number of dimensions.
Expressing the vector equation of a line in cartesian coordinates, we arrive at exactly the parametric equation:

![]() |
If x1 ≠x2
To retrieve the slope,
If x1= x2 the equation is x = x1 (or 1.x + 0.y - x1 = 0). The slope is π/2
|
![]() |
This is a particular case of the previous situation
To retrieve the slope,
|
| Form | Slope (φ) | intersects X at | Intersects Y at |
| y = ax + b | arctan (a) | x = -b/a (never, if a = 0) | y = b |
| y = y0t + yf x = x0t + xf |
If If x0 ≠ 0, arctan( y0/x0) If x0= 0, π/2 |
x =xf - x0 yf/y0 (never, if y0 = 0) |
y =yf - y0 xf/x0 (never, if x0 = 0) |
| ax+by+c = 0 | if b ≠ 0 arctan (-a/b), if b = 0, π/2 |
x = -c/a (never, if a = 0) | y = -c/b (never if b = 0) |
| x1,y1,x2,y2 (two points) |
arctan((y2-y1)/(x2-x1)) If x2 = x1, π/2 |
(never, if y1=y2) |
(never, if x1=x2) |
| From | To | Transformation |
| ax + by + c = 0 | y = fx + g | If b ≠0, f = -a/b, g = -c/b If b = 0, not possible |
y = fx+g |
ax+by+c = 0 |
a = -f, b = 1, c = -g |
| y = y0t + yf x = x0t + xf |
y = fx+g | If x0 ≠ 0 ⇒f = y0/x0, g =yf - xf/x0 If x0 = 0 ⇒ not possible |
| y = fx+g | y = y0t + yf x = x0t + xf |
|
| y = y0t + yf x = x0t + xf |
ax+by+c = 0 | If x0 ≠ 0 ⇒ c= (xfy0 - x0yf), a = x0, b = -y0 If x0 = 0 ⇒c = -xf, a = -1, b = 0 |
| x1,y1,x2,y2 (two points) |
y = ax + b | If x1 ≠x2, a = (y2-y1)/(x2-x1), b = y2- x2(y2-y1)/(x2-x1) If x1= x2 , not possible |
| x1,y1,x2,y2 (two points) |
y = y0t + yf x = x0t + xf |
Let Then |
| x1,y1,x2,y2 (two points) |
ax+by+c = 0 | a =(y2--y1) b =(x1-x2) c = (x2y1--y2x1) |