Vector Equation of a Line Explained with Worked Examples

The vector equation of a line is , where is the position vector of a point on the line, is a direction vector and is a real parameter.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

What Vector equation of a line means

Starting at the point and adding any multiple of the direction moves you along the line. Different values of give different points. In two dimensions this carries the same information as y = mx + c, with the gradient hidden in the direction vector.

To find the line through two points, use one as and take the direction to be the vector between the points. Two lines are parallel when their direction vectors are multiples of each other.

You can convert to Cartesian form by eliminating , and use the line to find where it meets a plane (see intersection of a line and a plane).

What is it used for?

A vector equation describes every point of a line with one formula. It works in two or three dimensions, where a single y = mx + c equation is not enough.

How to use vector equation of a line

  1. Choose a point on the line as .
  2. Find a direction vector (subtract two points if needed).
  3. Write .
  4. Test a point by solving for in each component.

Graph

The line r = (1, 2) + λ(2, 1) in two dimensionsa = (1, 2)λ = 1λ = 2-2-1012345678-10123456The line r = (1, 2) + λ(2, 1) in two dimensionsxyr = (1,2) + λ(2,1)Graph with x from -2 to 8 and y from -1 to 6. Shows the curve r = (1,2) + λ(2,1); point a = (1, 2) at (1, 2); point λ = 1 at (3, 3); point λ = 2 at (5, 4).

Each value of λ moves the same distance along the direction vector (2, 1), so equal steps in λ give equally spaced points.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: a point at λ = 2

The line . Find the point with .

Worked example
Answer
(5, 0, 11)(5,\ 0,\ 11)
  1. Substitute λ = 2

Example 2: a line through two points

Find a vector equation of the line through and , and check that is on it.

Worked example
Answer
r=(1,0,2)+λ(2,4,−4)\mathbf{r}=(1,0,2)+\lambda(2,4,-4)
  1. Direction PQ
  2. Equation
  3. R is at λ = 2

Example 3: is a point on the line?

Does lie on ?

Worked example Answer checked
Answer
yes, at λ=3\text{yes, at }\lambda=3
  1. x-component
  2. Check y and z

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

r = (1, 2, 3) + λ(2, −1, 4), λ = 2

x

5.

same

y

0.

same

z

11.

direction (2, −1, 4)

|b|

4.5826.

Word problems

r = a + λb: a is a point on the line, b a direction vector and λ a real parameter. Each value of λ gives one point.

x at λ = 2

1 + 2λ.

  1. 1 + 4
  2. Check: ✓5

y at λ = 2

2 − λ.

  1. 2 − 2
  2. Check: ✓0

z at λ = 2 Higher

3 + 4λ.

  1. 3 + 8
  2. Check: ✓11

Length of b Higher

√(4 + 1 + 16).

  1. √21
  2. Check: ✓4.5826

Common mistakes

Using a as the direction

wrong ✗

b is the direction ✓

Roles.

Adding λ to the point only

a + λ ✗

a + λb ✓

Multiply by b.

One unique form

unique ✗

many equivalent forms ✓

Any point and any multiple.

Direction needs unit length

unit ✗

any length ✓

Scale is free.

Exam tips

  1. Point + λ × direction.
  2. Direction from two points: B − A.
  3. Substitute λ to get points.
  4. Many equivalent forms.
  5. Check by solving for λ.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. x at λ = 3: (2, 0, 1) + λ(1, 2, 0) Foundation

5

2. y at λ = 3: same Foundation

6

3. |b| for b = (2, 3, 6) Foundation

7

4. z at λ = −1: (1, 1, 4) + λ(0, 1, 2) Higher

2

5. x at λ = 0.5: (0, 4, 1) + λ(6, 0, 2) Higher

3

6. |b| for b = (1, 2, 2) Higher

3

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Vector equation
r = a + λb.
Position vector
From the origin.
Direction vector
b.
Parameter (λ)
Real number.
Collinear
On one line.
Parametric form
x, y, z in terms of λ.

Frequently asked questions

What is the vector equation of a line?

r = a + λb.

How do I find b from two points?

b = B − A.

How do I test if a point lies on the line?

Find λ from each coordinate; it must agree.

Is the form unique?

No.

Which page covers the Cartesian form?

Cartesian equation of a line.

Which page covers planes?

vector equation of a plane.

More in Vectors and matrices and the formula sheets.