On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Advanced Functions · Grade 9-12

Lines in 3D

A line in 3D is described by a point on it and a direction vector, with a parameter t sliding you along it.

Parametric: x=x0+at, y=y0+bt, z=z0+ct
Vector: r(t)=r0+tv, where v=⟨a,b,c⟩
Symmetric: x−x0a=y−y0b=z−z0c

Quick Answer

A line in 3D is described by a point on it and a direction vector, with a parameter t sliding you along it. Starting from a point (x0,y0,z0) and a direction ⟨a,b,c⟩, each value of t gives the point (x0+at, y0+bt, z0+ct). Use it to write the line through two points, to follow a straight flight path or laser beam, to test whether a point lies on a line, and to decide whether two lines in space meet, run parallel, or miss each other entirely.

Why This Matters

In space a single slope cannot say which way a line goes, because there are three directions to account for. A point plus a direction vector can, and that is how flight paths, robot motions and the rays in 3D computer graphics are written. It also reveals something new in 3D: two lines can be neither parallel nor crossing, so "not parallel" no longer means "they meet".

Intuitive Explanation

A drone takes off from (2,1,0) and flies so that every second it moves 3 m east, 4 m north and 1 m up. After t seconds it is at x=2+3t, y=1+4t, z=t. At t=2 it is at (8,9,2). At t=−1 the equations give (−1,−3,−1), where the line continues behind the take-off point. The point (2,1,0) fixes where the line is; the vector ⟨3,4,1⟩ fixes which way it goes.

Any multiple of the direction vector describes the same line: ⟨6,8,2⟩ just covers it twice as fast. To test whether a point is on the line, solve one coordinate equation for t and check the others. For (11,13,3), z=t gives t=3, and then x=2+9=11 and y=1+12=13, so it is on the line. For (11,13,4), t=4 gives x=14, so it is not. Solving each coordinate for t and setting the results equal gives the symmetric form x−23=y−14=z1.

In 2D, an equation like 2x+3y=6 is a line. In 3D, the extra variable changes everything: 2x+3y+z=6 is a plane, a whole flat sheet, because one equation in three unknowns leaves two free choices. A line in space has only one free choice, the parameter t, or equivalently it needs two equations at once. That extra room is also why 3D lines can be skew: two flight paths can cross on a map at different heights without ever meeting in the air.

Think of it like this. A line in 3D is a laser beam: where the laser sits is the point (x0,y0,z0), the way it is aimed is the direction vector, and t measures how far along the beam you are. A real beam starts at the laser, though, while the mathematical line runs both ways, for negative t too.

Core idea. A 3D line is a starting point and a direction vector traced out by a slider parameter t.


When to Use

Use the point-and-direction form when a problem gives a point and a direction in x,y,z space, gives two points to join, or describes straight motion in 3D, such as a flight path, a drill line or a beam of light. It also settles whether a point lies on a line and whether two lines intersect, are parallel, or are skew. If there is only one equation ax+by+cz=d, the object is a plane, not a line. In a flat xy problem, y=mx+b is simpler.

Tip. Ask: Does the line live in x,y,z space and need a direction vector rather than a single slope?

How to Recognize It

Before writing a line in space, check how many coordinates each point has and what you are handed: a point and a direction, two points, or a single equation.

  1. Are you given two points, such as (1,2,0) and (4,0,5), but no direction?

    If yes, subtract them to get a direction vector, ⟨3,−2,5⟩, and start from either point: x=1+3t, y=2−2t, z=5t. A vector alone, with no point, fixes only a direction and is not yet a line.

  2. Is the object described by just one equation in x, y and z, such as 2x−y+3z=6?

    If yes, it is a plane, a flat sheet, not a line, and ⟨2,−1,3⟩ is its normal vector, pointing straight out of the sheet. A line in space needs three parametric equations, or two equations holding at once.

  3. Are you asked whether two lines meet, and are their direction vectors not multiples of each other?

    If yes, set the coordinates equal using separate parameters t and s and solve two of the equations. If those values fail the third equation, the lines are skew: they never meet and are not parallel, which cannot happen in a flat plane.

  4. Does every point have z=0, or no z at all?

    If yes, the line lies in the xy-plane and y=mx+b does the job, since one slope fixes a direction in 2D. In space a single ratio cannot also say how fast the line climbs in z, so you need all three components.

Lines in 3D compared with Line in 2D (y=mx+b), Planes in 3D, and Vectors

All four rows are built from points and vectors, so a direction vector, a normal vector and a slope are easy to swap. Ask what the object is: a path through space, a line in a flat plane, a flat sheet, or an arrow with no fixed position.

Lines in 3D

Meaning
Use this when you must describe a straight path in three-dimensional space, where a single slope cannot capture direction.
Key test
Does the line live in x,y,z space and need a direction vector rather than a single slope?
Formula
Parametric: x=x0+at, y=y0+bt, z=z0+ct
Vector: r(t)=r0+tv, where v=⟨a,b,c⟩
Symmetric: x−x0a=y−y0b=z−z0c
Example
Write parametric equations for the line through (1,0,2) and (4,3,2).

Line in 2D (y=mx+b)

Meaning
Uses one slope number for direction in a flat plane.
Key test
Use when the line lives in just x and y.
Formula
y=mx+b
Example
A line through (0,1) with slope 2

Planes in 3D

Meaning
Describes a flat infinite SURFACE, fixed by a normal vector, not a path.
Key test
Use when the object is a 2D sheet in space, not a 1D line.
Formula
ax+by+cz=d
Example
The floor z=0

Vectors

Meaning
An arrow with magnitude and direction but no fixed position along a path.
Key test
Use when you only need the direction/displacement itself, not the locus of points.
Formula
⟨a,b,c⟩
Example
The direction ⟨2,−1,4⟩ alone

Formula & Notation

Parametric: x=x0+at, y=y0+bt, z=z0+ct
Vector: r(t)=r0+tv, where v=⟨a,b,c⟩
Symmetric: x−x0a=y−y0b=z−z0c
ℓ(t)=r0+tv=⟨x0+at, y0+bt, z0+ct⟩ for t∈R; symmetric: x−x0a=y−y0b=z−z0c

How to read it: r0=⟨x0,y0,z0⟩ is the position vector of a known point, v=⟨a,b,c⟩ is the direction vector, and t is the parameter.

Worked Examples

Example 1 — Parametrize a line through two points

Easy

Write parametric equations for the line through (1,0,2) and (4,3,2).
Show the steps and the answer
  1. Subtract the points to get a direction: ⟨4−1, 3−0, 2−2⟩=⟨3,3,0⟩.

    The vector from one point to the other points along the line.

  2. Anchor at (1,0,2): x=1+3t, y=0+3t, z=2+0t.

    Each coordinate starts at the anchor and moves by its direction component times t.

  3. Simplify: y=3t and z=2.

    A zero component means that coordinate never changes, so the line stays at height 2.

  4. Check both points: t=0 gives (1,0,2) and t=1 gives (4,3,2).

    The line must pass through both given points.

Answer: x=1+3t, y=3t, z=2

Takeaway: Subtract the points for a direction and anchor at either one; a zero component keeps that coordinate constant.

Example 2 — Looks like a line but is a plane

Standard

What does 2x+3y+z=6 describe in 3D?
Show the steps and the answer
  1. Count equations and unknowns: one equation, three unknowns.

    Each independent equation removes one free choice; one equation in 3D leaves two, which makes a surface.

  2. Find some points: (3,0,0), (0,2,0) and (0,0,6) all satisfy it.

    Three points not on one line already fix a flat sheet, so the solutions cannot all lie on a single line.

  3. Read the normal vector from the coefficients: ⟨2,3,1⟩.

    The coefficients give the direction perpendicular to the surface, not a direction along a path.

Answer: A plane, not a line

Takeaway: One linear equation in x, y, z is a plane; a line in 3D needs a parameter, or two equations at once.

Example 3 — Find the mistake: not parallel does not mean crossing

Application

Line 1 is x=1+t, y=2+t, z=t. Line 2 is x=2s, y=−s, z=5. Ben writes: "The directions ⟨1,1,1⟩ and ⟨2,−1,0⟩ are not parallel, so the lines must cross." Find the mistake and correct it.
Show the steps and the answer
  1. Check parallel: ⟨1,1,1⟩ is not a multiple of ⟨2,−1,0⟩.

    Ben is right that the lines are not parallel; the question is whether they meet.

  2. Set the coordinates equal, with a separate parameter for each line: 1+t=2s, 2+t=−s, t=5.

    The lines could reach a shared point at different parameter values, so each needs its own.

  3. Solve two of the equations: t=5, then 1+5=2s gives s=3.

    Two equations are enough to find candidate values for t and s.

  4. Test the third: 2+t=7 but −s=−3, and 7≠−3.

    No pair (t,s) satisfies all three equations, so the lines never meet: they are skew.

Answer: The lines are skew: not parallel, and they never meet

Takeaway: In 3D, non-parallel lines meet only if one pair (t,s) satisfies all three coordinate equations; otherwise they are skew.

Where You'll See It

  • Planning a straight drill path

    A well is drilled from (0,0,0) toward a target at (300,400,−1200) m, so the drill follows (300t, 400t, −1200t) for 0≤t≤1. At t=0.5 the bit is at (150,200,−600): 600 m down and 250 m sideways from the start.

  • Rays in 3D computer graphics

    To draw a pixel, a renderer sends a ray from the camera at the origin along that pixel's direction, say t⟨1,2,−2⟩. Where the ray meets the floor z=−4, −2t=−4 gives t=2 and the point (2,4,−4), so the pixel shows the floor's color there.

  • Two flight paths that never meet

    One plane flies east along (8t, 0, 10) km and another flies north along (40, −40+8t, 11) km. Their tracks cross on the map at (40,0), but at heights of 10 km and 11 km, so the paths are skew lines that stay 1 km apart vertically.

Common Mistakes

  1. The slip: Confusing the point with the direction vector

    Instead: (x0,y0,z0) is where the line is, ⟨a,b,c⟩ is which way it goes; they play different roles.

  2. The slip: Writing symmetric form when a direction component is zero

    Instead: if a=0 you cannot divide by it, so keep that coordinate as a separate equation like x=x0.

  3. The slip: Assuming two lines with different direction vectors must cross

    Instead: in 3D they can be skew (never meet and never parallel).


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Write parametric equations for the line through (2,−1,3) with direction vector ⟨1,4,−2⟩.

    Hint: Point components are the starting values; direction components multiply t.

  2. Write parametric equations for the line through (1,2,3) and (3,5,4), then give one more point on it.

    Hint: Subtract the points to get a direction vector.

  3. Does the point (7,1,−3) lie on the line x=1+3t, y=5−2t, z=1−2t?

    Hint: Find t from one coordinate, then check the other two.

  4. Write the line x=4+2t, y=−1+5t, z=3 in symmetric form.

    Hint: Solve each equation for t. What happens with z?

  5. In the xy-plane, y=2x+1 is a line. In 3D space, is y=2x+1 still a line?

    Hint: In 3D, what is z allowed to be?

  6. For the line through (1,2,0) with direction ⟨3,0,1⟩, a student writes: "x=3+t, y=2t, z=1." Correct the mistake.

    Hint: Which vector says where the line is, and which says which way it goes?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Can the same line have equations that look completely different?

Yes. Any point on the line can serve as the start, and any nonzero multiple of the direction vector can serve as the direction. The line x=1+3tx=1+3t, y=2−2ty=2-2t, z=5tz=5t is also x=4−6sx=4-6s, y=4sy=4s, z=5−10sz=5-10s. To check that two answers match, confirm that the direction vectors are multiples of each other and that the start point of one satisfies the other.

Why does a line in space need more than one equation when a plane needs only one?

Each equation in xx, yy and zz takes away one degree of freedom. Space has three; one equation such as z=0z=0 leaves a two-dimensional plane, and two equations together, such as z=0z=0 and y=0y=0, leave the one-dimensional xx-axis. Parametric equations work the other way round: they build every point from a single free number tt, which is why a line has exactly one parameter.

How do I find the angle between two lines in space?

Use their direction vectors and the dot product: cos⁡θ=∣u⋅v∣∣u∣∣v∣\cos\theta=\frac{|\mathbf{u}\cdot\mathbf{v}|}{|\mathbf{u}||\mathbf{v}|}. For ⟨1,0,0⟩\langle 1,0,0\rangle and ⟨1,1,0⟩\langle 1,1,0\rangle, cos⁡θ=12\cos\theta=\frac{1}{\sqrt{2}}, so θ=45∘\theta=45^\circ. The absolute value picks the smaller of the two angles the lines form. This works even for skew lines, which never touch: the angle compares their directions, not their positions.

Where are lines in 3D used in real life?

Computer graphics run on them. To decide what each pixel of a rendered image shows, ray tracing sends a line r(t)=r0+tv\mathbf{r}(t)=\mathbf{r}_0+t\mathbf{v} from the camera through that pixel and finds the smallest positive tt at which it hits an object. Air-traffic systems use the same idea to check whether two straight flight paths come too close, and tunnel engineers use it to aim crews digging from both ends.

Learning Path

Lines in 3D

You are here

Next →

Planes in 3D
You need Parametric Equations, since a 3D line is x, y and z each written as a linear function of one parameter t. This topic adds direction vectors, the symmetric form, and the three ways two lines can relate in space: crossing, parallel, or skew. Next, Planes in 3D describe flat surfaces with one equation and a normal vector, and lines and planes together give intersection points and distances in space.

See Also