Perpendicular lines
d₁ = (1, 2, 2), d₂ = (2, 1, −2): d₁·d₂ = 2 + 2 − 4 = 0
A scalar product of zero means the lines are perpendicular.
The angle between two lines with direction vectors and satisfies , taking the acute angle.
This page is easier if you are comfortable with:
The angle between two lines is the angle between their directions. Take the scalar product of the direction vectors, divide by the product of their lengths and use the inverse cosine. The absolute value gives the acute angle between the lines.
A zero scalar product means the lines are perpendicular, just as the product of gradients is −1 for perpendicular lines in two dimensions. If the directions are multiples of each other, the lines are parallel.
The lines are given in vector form; their direction vectors are the multipliers of and .
The angle between two lines tells you how sharply they cross or how nearly they are parallel. In space it is defined through the direction vectors, even when the lines do not meet.
The angle between the lines is the angle between their direction vectors, found with the scalar product.
These examples are worked by hand, step by step, so you can compare your own working.
Find the angle between lines with directions and .
Find the angle between lines with directions and .
Find the angle between lines with directions and .
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
d₁ = (1, 2, 2), d₂ = (2, 1, −2): d₁·d₂ = 2 + 2 − 4 = 0
A scalar product of zero means the lines are perpendicular.
d₁ = (1, 1, 0), d₂ = (1, 0, 0): cos θ = 1/√2, so θ = 45°
The diagonal of the xy-plane makes 45° with the x-axis.
d₁ = (3, 4, 0), d₂ = (1, 0, 0): cos θ = 3/5, so θ ≈ 53.1°
The lengths are 5 and 1, and the scalar product is 3.
d₁ = (1, 0, 0), d₂ = (−1, 1, 0): d₁·d₂ = −1, so the vectors are at 135°, but the lines meet at 45°
Use the absolute value of the scalar product to get the acute angle.
| Directions | d₁·d₂ | Angle between the lines |
|---|---|---|
| (1, 0, 0) and (0, 1, 0) | 0 | 90° |
| (1, 1, 0) and (1, 0, 0) | 1 | 45° |
| (3, 4, 0) and (1, 0, 0) | 3 | 53.1° |
| (1, 2, 2) and (2, 1, −2) | 0 | 90° |
Find the direction vectors, work out the scalar product and the two lengths, then use cos θ = |d₁·d₂| ÷ (|d₁||d₂|). Give the acute angle.
Line 1 has direction (1, 2, 2) and line 2 has direction (3, 0, 4). Find the acute angle between them.
Two lines have directions (2, −1, 3) and (1, 5, 1). Are they perpendicular?
Line 1 has direction (1, 2, 2) and line 2 has direction (−2, 3, 6). Find the acute angle between them to 1 decimal place.
Line 1 has direction (1, 0, 0) and line 2 has direction (−1, 1, 0). Find the angle between the lines.
using the vector to a point on the line ✗
use the direction vector, the coefficient of the parameter t ✓
The angle between lines depends only on their directions.
cos θ = −1/√2, so θ = 135° ✗
cos θ = 1/√2, so θ = 45° ✓
The angle between two lines is taken as the acute angle.
cos θ = 11 ÷ 3 = 3.67 ✗
cos θ = 11 ÷ (3 × 5) = 0.733 ✓
Divide by the product of both lengths. A cosine cannot be greater than 1.
sin θ = 11 ÷ 15, so θ = 47.2° ✗
cos θ = 11 ÷ 15, so θ = 42.8° ✓
The scalar product formula uses cosine.
(1, 2, 2)·(3, 0, 4) = 3 + 0 + 4 = 7 ✗
3 + 0 + 8 = 11 ✓
Multiply the matching components, 2 × 4 = 8.
|(1, 2, 2)| = 5 ✗
|(1, 2, 2)| = √9 = 3 ✓
Add the squares 1 + 4 + 4 = 9, then take the root.
Try each one on paper, then open the answer. Use the solver above to see the full working.
cos θ = 1/√2, so θ = 45°
cos θ = 4/5, so θ = 36.9°
The scalar product is 2 − 2 + 0 = 0, so yes
cos θ = 1/√3, so θ = 54.7°
The scalar product is 90, the lengths are 7 and 13, so cos θ = 90/91 and θ = 8.5°
The scalar product is 1 and the lengths are √2 and √2, so cos θ = 1/2 and θ = 60°
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
Use cos θ = |d₁·d₂| ÷ (|d₁||d₂|), where d₁ and d₂ are the direction vectors.
When the scalar product of their direction vectors is zero. Compare perpendicular lines in two dimensions.
The acute angle. The absolute value of the scalar product makes sure you get it.
No. The angle depends only on the directions, so it can be found for skew lines too.
Use the same formula. The lines are skew if they are not parallel and do not meet.
The same idea gives the angle between a line and a plane and the angle between two planes.
More in Vectors and matrices and the formula sheets.