Back to homeMathematics · Precalculus · Change subject
Start for free
Precalculus · Mathematics
Vectors and Geometry · Lines in the plane

Equations of a Line in the Plane

Before you start, make sure you know: Vectors in the plane (Geometry)
Before you start, make sure you know: Point-slope equation of the line (Algebra 1)

In a video game, your character runs along a straight path across the map. The game's code stores that path as $x = 4 + 3t$, $y = 1 + 2t$. Your Algebra 1 notes would write the same path as $y = \tfrac{2}{3}x - \tfrac{5}{3}$, and a GPS app might store it as $2x - 3y - 5 = 0$. These are not three different paths. They are one line in three disguises.

Why does a line have so many equations, and how do you jump from one to another? Once you see where each form comes from, switching between them is mechanical. We'll close the loop at the end of the page.

The vector equation: a point and a direction

To pin down a line you need only two things: one point on it and the direction it points. Think of standing at a point $A$ and walking in the direction of a vector $\vec v$ for as long as you like, forwards or backwards.

Some problems write vectors with parentheses, like $(-1, 4)$. That is the same as $\langle -1, 4\rangle$.

Animation of the vector equation of a line: as the parameter t changes, the point X = A + t·v slides along the line, and a segment from A to X shows t·v, stretching when t is greater than 1 and flipping to the other side of A when t is negative. A v X = A + t·v

Why does this work? The vector $t\vec v$ always points along the same direction as $\vec v$ (or exactly opposite when $t < 0$). Starting at $A$ and adding it, you can only ever land on the line through $A$ with direction $\vec v$.

Practice★☆☆Not started
Write the vector equation and the parametric equations of the line that passes through the point $A(3, -2)$ and has $\vec{v} = (-1, 4)$ as its direction vector.

Write the vector equation and the parametric equations of the line that passes through the point $A(3, -2)$ and has $\vec{v} = (-1, 4)$ as its direction vector.

Solve

Parametric equations

The vector equation is really two equations in one, one for each coordinate. Writing them separately gives the form most graphing tools and animations use.

A line in the plane with three marked points for the parameter values t = 0, t = 0.5 and t = 1. t = 0 t = 0.5 t = 1

Parametric equations are the easiest way to find where a line crosses the axes. For the x-intercept, set $y = 0$, solve for $t$, then find $x$. For the y-intercept, set $x = 0$.

Practice★★☆Not started
A surveillance drone moves in a straight line and at a constant speed from point $A(10, 20)$ to point $B(50, 80)$, with the coordinates measured in feet. Write the…

A surveillance drone moves in a straight line and at a constant speed from point $A(10, 20)$ to point $B(50, 80)$, with the coordinates measured in feet. Write the parametric equations of its path and indicate what its coordinates will be when it has traveled exactly half the distance.

Solve
Practice★★☆Not started
An underground pipe follows the path given by the parametric equations $x = -5 + 2t$, $y = 12 - 3t$ (in miles). Determine at which exact points the pipe crosses the…

An underground pipe follows the path given by the parametric equations $x = -5 + 2t$, $y = 12 - 3t$ (in miles). Determine at which exact points the pipe crosses the coordinate axes.

Solve

Symmetric form: eliminating the parameter

Sometimes you don't care about time or $t$, you just want an equation in $x$ and $y$. Solve both parametric equations for $t$ and set them equal.

Some problems call this the Cartesian form of the line. In the same way, some problems call the general form (next section) the implicit equation and the slope-intercept form the explicit equation.

Diagram showing that eliminating the parameter t from the two parametric equations gives the symmetric form of the line. x = a₁ + t·v₁ y = a₂ + t·v₂ solve for t, set equal (x−a₁)/v₁ = (y−a₂)/v₂
Practice★☆☆Not started
Given the line in parametric equations $x = 2 - 3t$, $y = 1 + 5t$, express it in Cartesian form and in general form.

Given the line in parametric equations $x = 2 - 3t$, $y = 1 + 5t$, express it in Cartesian form and in general form.

Solve
Practice★☆☆Not started
Check whether the points $M(4, -3)$ and $N(1, 2)$ belong to the line with Cartesian equation $\frac{x-2}{2} = \frac{y+1}{-2}$.

Check whether the points $M(4, -3)$ and $N(1, 2)$ belong to the line with Cartesian equation $\frac{x-2}{2} = \frac{y+1}{-2}$.

Solve

General form and the normal vector

Clear the denominators in the symmetric form and move everything to one side. The result is the form that works for every line, vertical ones included.

Why is $\langle A, B\rangle$ perpendicular to the line? If $(x_0, y_0)$ is on the line, then $A(x - x_0) + B(y - y_0) = 0$ for every point $(x, y)$ on it. That says $\langle A, B\rangle \cdot \langle x - x_0, y - y_0\rangle = 0$: the dot product of the normal with any vector along the line is zero. Check with the two vectors above: $\langle A, B\rangle \cdot \langle -B, A\rangle = -AB + AB = 0$.

A line in general form with its direction vector along the line and its normal vector perpendicular to it. direction ⟨−B, A⟩ normal ⟨A, B⟩ Ax + By + C = 0
Practice★☆☆Not started
Write the implicit equations of the horizontal line that passes through the point $H(-7, 4)$ and of the vertical line that passes through the point $V(3, -9)$.

Write the implicit equations of the horizontal line that passes through the point $H(-7, 4)$ and of the vertical line that passes through the point $V(3, -9)$.

Solve
Practice★☆☆Not started
Given the implicit equation $5x + 7y - 11 = 0$, indicate a direction vector, a normal vector and a point through which the line passes.

Given the implicit equation $5x + 7y - 11 = 0$, indicate a direction vector, a normal vector and a point through which the line passes.

Solve
Practice★★☆Not started
Determine the value of the parameter $k$ so that the line with equation $3x - ky + 5 = 0$ passes through the point $P(-2, 1)$. Once $k$ is found, write the equation of…

Determine the value of the parameter $k$ so that the line with equation $3x - ky + 5 = 0$ passes through the point $P(-2, 1)$. Once $k$ is found, write the equation of the line in Cartesian form.

Solve

Slope-intercept form

This is the form from Algebra 1. Solve the general form for $y$ and you get a line as a function of $x$.

Connections to the other forms:

  • With a direction vector $\langle v_1, v_2\rangle$, the slope is $m = \dfrac{v_2}{v_1}$ (rise over run).

  • With $Ax + By + C = 0$ and $B \neq 0$, the slope is $m = -\dfrac{A}{B}$ and the y-intercept is $b = -\dfrac{C}{B}$.

  • A line through the origin has $b = 0$, so $y = mx$.

Try the sliders and watch how $m$ tilts the line and $b$ slides it up and down.

Practice★☆☆Not started
Determine the slope and the y-intercept of the line whose general equation is $4x - 2y + 8 = 0$.

Determine the slope and the y-intercept of the line whose general equation is $4x - 2y + 8 = 0$.

Solve
Practice★☆☆Not started
Find the explicit equation of the line that passes through the origin and has a slope of $m = -\frac{3}{5}$.

Find the explicit equation of the line that passes through the origin and has a slope of $m = -\frac{3}{5}$.

Solve
Practice★★☆Not started
The production cost of an electronic component follows a linear model. Manufacturing $100$ units costs $\$450$, and manufacturing $250$ units costs $\$825$. Determine…

The production cost of an electronic component follows a linear model. Manufacturing $100$ units costs $\$450$, and manufacturing $250$ units costs $\$825$. Determine the explicit equation that relates the cost $y$ to the number of units $x$, and calculate the fixed production cost (the cost when $0$ units are manufactured).

Solve

Point-slope form and the line through two points

Often you know a point and the slope, but not $b$. Point-slope form lets you write the line without finding $b$ first.

To find the line through two points $P(x_1, y_1)$ and $Q(x_2, y_2)$:

  1. Compute the slope $m = \dfrac{y_2 - y_1}{x_2 - x_1}$.

  2. Use $m$ and either point in point-slope form.

  3. Rewrite in whatever form you need.

A line through two points P and Q with a right triangle showing the run x2 minus x1 and the rise y2 minus y1. P(x₁, y₁) Q(x₂, y₂) run = x₂ − x₁ rise y₂ − y₁ m = rise / run
Practice★☆☆Not started
Write the point-slope equation of the line that passes through the points $P(-1, 5)$ and $Q(2, -1)$.

Write the point-slope equation of the line that passes through the points $P(-1, 5)$ and $Q(2, -1)$.

Solve
Practice★★☆Not started
Find the general equation of the line that passes through the point $A(-4, 6)$ and is parallel to the line joining the points $B(1, 1)$ and $C(3, -5)$.

Find the general equation of the line that passes through the point $A(-4, 6)$ and is parallel to the line joining the points $B(1, 1)$ and $C(3, -5)$.

Solve
Practice★★☆Not started
In the design of a suspension bridge, one of the steel tension cables must join the anchor point $P(0, 15)$ to the base $Q(40, 0)$ (coordinates in feet). Find the…

In the design of a suspension bridge, one of the steel tension cables must join the anchor point $P(0, 15)$ to the base $Q(40, 0)$ (coordinates in feet). Find the general equation of the line that defines the cable and determine at what height it is when the horizontal distance from the $Y$-axis is $16$ feet.

X (ft) Y (ft) P(0, 15) Q(40, 0) h = ? 16
Solve

Intercept form

When a problem gives you where the line crosses the axes, there is a very short form.

A line crossing the x-axis at (a, 0) and the y-axis at (0, b), forming a right triangle with the axes. (a, 0) (0, b) x/a + y/b = 1 area = ½|a||b|

The axes and the line form a right triangle with legs $|a|$ and $|b|$, so its area is $\tfrac12 |a|\,|b|$. This makes intercept form handy for area problems.

Practice★★☆Not started
Calculate the area of the triangle formed by the line $2x + 5y - 20 = 0$ and the Cartesian coordinate axes.

Calculate the area of the triangle formed by the line $2x + 5y - 20 = 0$ and the Cartesian coordinate axes.

Solve
Practice★★★Not started
Prove that if a line intersects the coordinate axes at the points $(a, 0)$ and $(0, b)$, with $a \neq 0$ and $b \neq 0$, its equation can be written in the intercept…

Prove that if a line intersects the coordinate axes at the points $(a, 0)$ and $(0, b)$, with $a \neq 0$ and $b \neq 0$, its equation can be written in the intercept form $\frac{x}{a} + \frac{y}{b} = 1$. Use this result to find the equation of a line that forms a triangle of area $12 \text{ u}^2$ with the Cartesian axes, given that $a = 2b$ and that both intercepts are positive.

Solve
Practice★★★Not started
Given the point $P(3, 4)$ and the line $r: 2x + y - 5 = 0$, find the coordinates of a point $Q$ located on the y-axis such that the line joining $P$ and $Q$ has the same…

Given the point $P(3, 4)$ and the line $r: 2x + y - 5 = 0$, find the coordinates of a point $Q$ located on the y-axis such that the line joining $P$ and $Q$ has the same y-intercept as the line $r$.

Solve

One line, many forms

Every form carries the same information: a point and a direction. Once you can spot those two, you can write any form.

Form Looks like What you read right away
Vector $(x, y) = A + t\vec v$ point and direction
Parametric $x = a_1 + tv_1,\ y = a_2 + tv_2$ point and direction, coordinate by coordinate
Symmetric $\frac{x - a_1}{v_1} = \frac{y - a_2}{v_2}$ point and direction, no $t$
General $Ax + By + C = 0$ direction $\langle -B, A\rangle$, normal $\langle A, B\rangle$
Slope-intercept $y = mx + b$ slope $m$, y-intercept $b$
Point-slope $y - y_1 = m(x - x_1)$ slope and one point
Six boxes naming the six equivalent forms of the equation of the same line in the plane. six forms, one line vector parametric symmetric general slope-intercept point-slope
Practice★★☆Not started
Express the line $y = -\frac{1}{4}x + 2$ in vector form and find three distinct points that belong to it, where at least one has a negative x-coordinate.

Express the line $y = -\frac{1}{4}x + 2$ in vector form and find three distinct points that belong to it, where at least one has a negative x-coordinate.

Solve
Practice★★★Not started
Determine the values of the parameters $a$ and $b$ so that the line given in parametric form $x = a + 2t$, $y = 3 - bt$ represents the same line as the general equation…

Determine the values of the parameters $a$ and $b$ so that the line given in parametric form $x = a + 2t$, $y = 3 - bt$ represents the same line as the general equation $4x + 3y - 10 = 0$.

Solve

Where two lines meet

Two lines that are not parallel cross at exactly one point. To find it, put both equations in forms that you can solve together: a system of two equations, which you can solve by substitution or elimination as in Algebra 1.

If one line is given parametrically and the other in general form, substitute $x(t)$ and $y(t)$ into the general equation and solve for $t$. If both are parametric, use a different letter for each parameter (say $s$ and $u$), then solve the system.

Practice★★★Not started
The sides of a triangle are contained in the lines $r: x - 2y + 4 = 0$, $s: 3x + y - 9 = 0$ and $t: x + 5y + 4 = 0$. Calculate the coordinates of its three vertices and…

The sides of a triangle are contained in the lines $r: x - 2y + 4 = 0$, $s: 3x + y - 9 = 0$ and $t: x + 5y + 4 = 0$. Calculate the coordinates of its three vertices and decide, by calculating the lengths of its sides, what type of triangle it is.

Solve
Practice★★★Not started
Two airplanes move in the plane of a radar. Airplane $A$ follows the path $x = 2 + 3t$, $y = 1 + 4t$, and airplane $B$ follows the path $x = 10 - t$, $y = -2 + 5t$…

Two airplanes move in the plane of a radar. Airplane $A$ follows the path $x = 2 + 3t$, $y = 1 + 4t$, and airplane $B$ follows the path $x = 10 - t$, $y = -2 + 5t$ (where $t$ is the time in minutes and the coordinates are in miles). Determine the exact point where their paths cross and find out if the airplanes will collide (that is, if they pass through that point at the same instant $t$).

Solve

Families of lines and the mirror trick

Families of lines. Take two lines that meet at a point $P$: $L_1: A_1x + B_1y + C_1 = 0$ and $L_2: A_2x + B_2y + C_2 = 0$. Then every equation

$$(A_1x + B_1y + C_1) + k\,(A_2x + B_2y + C_2) = 0$$

is a line through $P$. This is a family of lines through $P$ (some problems call it a pencil), and $P$ is its center.

Why? At $P$ both parentheses are $0$, so any combination of them is $0$ too. As $k$ changes, the line pivots around $P$. (The one line you can't get is $L_2$ itself.)

To get the member with a given slope, expand the family, write the slope as $-\dfrac{A}{B}$ with $A$ and $B$ containing $k$, and solve for $k$.

The mirror trick. A laser bounces off a flat mirror with the angle of incidence equal to the angle of reflection. To find where it hits, reflect one of the points across the mirror. The bounce path then becomes a straight line.

A beam from A bounces off a mirror along the x-axis at P and reaches B. Reflecting B across the mirror gives B prime, and A, P and B prime lie on one straight line. mirror (x-axis) A B B′ P B′ is the reflection of B

Why it works: reflecting $B$ across the mirror keeps distances to the mirror, so the angle that $PB$ makes with the mirror equals the angle that $PB'$ makes. A straight line from $A$ to $B'$ then meets the mirror at exactly the point where the two angles are equal.

Practice★★★Not started
Consider the pencil of lines determined by the equation $(2 + k)x + (1 - 2k)y + (3k - 4) = 0$. Find the center of the pencil (the point through which all the lines pass…

Consider the pencil of lines determined by the equation $(2 + k)x + (1 - 2k)y + (3k - 4) = 0$. Find the center of the pencil (the point through which all the lines pass regardless of the value of $k$) and determine the value of $k$ for which the line of the pencil has a slope of $\frac{3}{5}$.

Solve
Practice★★★Not started
A laser beam starts from the point $A(2, 5)$, strikes a flat mirror located along the x-axis, reflects and passes through the point $B(8, 3)$. Given that the angle of…

A laser beam starts from the point $A(2, 5)$, strikes a flat mirror located along the x-axis, reflects and passes through the point $B(8, 3)$. Given that the angle of incidence is equal to the angle of reflection, find the equations of the lines containing the incident beam and the reflected beam, and the exact point of bounce on the mirror.

X Y α α A(2, 5) B(8, 3) R(?, 0)
Solve

Back to the start: the path $x = 4 + 3t$, $y = 1 + 2t$, the equation $y = \tfrac23 x - \tfrac53$ and the equation $2x - 3y - 5 = 0$ all pass through $(4, 1)$ and share the direction $\langle 3, 2\rangle$ (slope $\tfrac23$). Same point, same direction, same line.

Summary

See all the exercises in this section