Scientia sine finibus

Linear Algebra / Unit 1, Vectors / Topic 1.3

Units and Topics

Unit 1. Vectors

1.3 Lines and Planes

This topic shows how to describe a line with vectors. A line can be described by a point and a direction, or by one equation. The same two descriptions also work for a plane in three dimensions.

You need Topics 1.1 and 1.2 for this topic.

1. A Line Through the Origin

In Topic 1.1, all of the multiples of one vector were on a single line through the origin. This gives a way to describe that line. Choose a vector d that points along the line. Then each point of the line is td for some number t.

r = td

The vector d is called a direction vector of the line. The number t is called a parameter. Each value of t gives one point of the line. With d = (2, 1), the value t = 3 gives the point (6, 3), and the value t = −1 gives the point (−2, −1).

2. A Line Through Any Point

A line that does not pass through the origin needs one more piece of information: a point on the line. Call that point p. To reach any point of the line, first go to p, and then move along the direction d.

r(t) = p + td

This is called the parametric form of the line. For example, the line through p = (1, 2) with direction d = (2, 1) is

r(t) = 12 + t 21the point p plus t times the direction dr(t) = 1 + 2t2 + tadd the matching components

The value t = 0 gives the point p. The value t = 1 gives (3, 3). The value t = 2 gives (5, 4).

You have seen this equation in physics. An object that starts at position p and moves with a constant velocity d is at the position p + td at time t. The parametric form of a line is motion at constant velocity.

A line has many parametric forms. Any point of the line can be used as p, and any multiple of d, except the zero vector, can be used as the direction vector.

Try it: a point and a direction

Drag the purple point to move the line. Drag the tip of the blue arrow to change the direction. Move the slider, or press Play, to move the green point along the line.

3. A Line as One Equation

In algebra, a line is usually written as one equation, such as x + 2y = 5. The dot product connects this form to vectors.

Choose a vector n that is perpendicular to the line. This vector is called a normal vector of the line. Let p be a point on the line, and let r = (x, y) be any other point on the line. The vector from p to r lies along the line, so it is perpendicular to n. From Topic 1.2, two perpendicular vectors have a dot product of 0.

n · (r − p) = 0

With n = (a, b), this equation becomes ax + by = c, where c = n · p.

For example, take n = (1, 2) and p = (1, 2).

c = n · pthe formula for cc = (1)(1) + (2)(2) = 5multiply the matching components and add

The line is

x + 2y = 5

In the equation ax + by = c, the coefficients a and b are the components of a normal vector. The line x + 2y = 5 is perpendicular to the vector (1, 2). This fact is used often in the next topic.

Changing from one form to the other

To go from the parametric form to one equation, find a vector that is perpendicular to d. If d = (d₁, d₂), the vector n = (−d₂, d₁) works, because their dot product is −d₂d₁ + d₁d₂ = 0. Then calculate c = n · p.

To go from one equation to the parametric form, find one point that satisfies the equation, and use a direction vector that is perpendicular to (a, b).

In the drawing above, turn on the normal vector and compare the equation in the readout with the components of n.

4. Three Dimensions

A vector in three dimensions has three components. The rules from Topics 1.1 and 1.2 do not change. Addition and scalar multiplication work component by component, and the dot product has one more term:

u · v = u₁v₁ + u₂v₂ + u₃v₃

A line in three dimensions has the same parametric form, r(t) = p + td, with three components in each vector.

Planes

A plane is a flat surface that extends without end. A plane needs a point and two directions that are not along the same line. Each point of the plane is reached by going to p and then moving along u and along v:

r(s, t) = p + su + tv

The part su + tv is a linear combination, so a plane through the origin is the span of two vectors, as in Topic 1.1.

A plane can also be written as one equation. In three dimensions, exactly one direction is perpendicular to a plane. With a normal vector n = (a, b, c) and a point p on the plane,

n · (r − p) = 0 which becomes ax + by + cz = d

For example, take the plane through (1, 0, 2) with the normal vector (2, −1, 3).

d = (2)(1) + (−1)(0) + (3)(2)the dot product of the normal vector and the pointd = 8add the products2x − y + 3z = 8the equation of the plane

One equation removes one dimension. In the plane, one equation leaves a line. In three dimensions, one equation leaves a plane, and two equations together usually leave a line.

Common Mistakes

  • Using the coefficients of the equation as the direction. In x + 2y = 5, the vector (1, 2) is perpendicular to the line. It does not point along the line.
  • Treating p and d as the same kind of object. The vector p gives a location on the line. The vector d gives a direction.
  • Thinking that a line has only one parametric form. Two forms that look different can describe the same line.
  • Expecting one equation to give a line in three dimensions. One equation in x, y, and z gives a plane.

Summary

ObjectPoint and directionOne equation
Line in the planer = p + tdax + by = c
Line in spacer = p + tdTwo equations are needed
Plane in spacer = p + su + tvax + by + cz = d

Practice

Work each problem on paper first. Then open the answer to check your work.

1. Write a parametric form of the line through (2, −1) with direction vector (1, 3). Then find the point for t = 2.

r(t) = (2, −1) + t(1, 3)the point plus t times the direction vectorr(t) = (2 + t, −1 + 3t)add the matching componentsr(2) = (2 + 2, −1 + 6) = (4, 5)substitute t = 2

2. Write a parametric form of the line through the points (1, 1) and (4, 3).

d = (4 − 1, 3 − 1) = (3, 2)a direction vector is the vector from one point to the otherr(t) = (1, 1) + t(3, 2)one answer

3. Find the equation of the line through (3, 1) with normal vector (2, 5).

c = (2)(3) + (5)(1) = 11the dot product of the normal vector and the point2x + 5y = 11the equation of the line

4. Write the line r(t) = (0, 2) + t(4, 1) as one equation.

n = (−1, 4)a vector that is perpendicular to the direction (4, 1)(−1)(4) + (4)(1) = 0the checkc = (−1)(0) + (4)(2) = 8the dot product of n and the point (0, 2)−x + 4y = 8the equation of the line

5. Is the point (5, 0) on the line x + 2y = 5? Is the point (2, 2)?

5 + 2(0) = 5the point (5, 0) is on the line2 + 2(2) = 6the point (2, 2) is not on the line, because 6 is not 5

6. Find the equation of the plane through (0, 1, 2) with normal vector (1, 1, −2).

d = (1)(0) + (1)(1) + (−2)(2) = −3the dot product of the normal vector and the pointx + y − 2z = −3the equation of the plane

Python Practice

Step 1. Find points on a line

Python reads the code one line at a time, from the top to the bottom. The equals sign stores the value on its right under the name on its left, and print shows a result. A vector is written as np.array([1, 2]), where np stands for NumPy, the part of Python that works with vectors and matrices. The * sign means multiplication.

The code below uses the parametric form r(t) = p + td from Part 2 of this topic, with p = (1, 2) and d = (2, 1). It finds the point for t = 2.

Python

The result is [5 4], which is the point (5, 4) from Part 2.

Now change the value of t so that the code prints the point (−3, 0). On a keyboard, type the minus sign with the hyphen key.

Python

Step 2. Find the equation of a line

From Part 3 of this topic, a line with the normal vector n = (a, b) that passes through the point p has the equation ax + by = c, where c = n · p. The instruction np.dot calculates a dot product.

Python

The result is 5, so the line is x + 2y = 5.

Now find the number c for the line with the normal vector (3, −1) that passes through the point (2, 4). Change n and p in the next box.

Python

Step 3. Test whether a point is on a line

A point r is on the line x + 2y = 5 when n · r = 5, with n = (1, 2). The code below tests the point (3, 1).

Python

The result is 5, so the point (3, 1) is on the line.

In the next box, change r to a different point that is on the line x + 2y = 5.

Python

Step 4. Work with a plane in three dimensions

A vector in three dimensions has three numbers inside the square brackets. The rest of the code does not change. The code below finds the number d for the plane from Part 4 of this topic, which passes through (1, 0, 2) and has the normal vector (2, −1, 3).

Python

The result is 8, so the plane is 2x − y + 3z = 8.

Now test whether the point (3, 1, 1) is on this plane. Change p to that point and press Run. The point is on the plane if the result is 8.

Python

The result is 8, so the point (3, 1, 1) is on the plane.

Quiz

This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.

Choose how your answers are checked

1. A line has the parametric form r(t) = (2, 1) + t(1, 3). Find the point of the line at t = −2.

2. A line passes through the point (1, 2) and has the normal vector (3, −1). Its equation is 3x − y = c. Find c.

3. Which of these points is on the line 2x + y = 7?

4. Which vector is a direction vector of the line 2x + y = 7?

5. A plane passes through the point (2, 1, −1) and has the normal vector (1, 4, 2). Its equation is x + 4y + 2z = d. Find d.

Next: Topic 1.4, Vectors in n Dimensions