Angles and perpendicular vectors · Mathematics Class… | StemPy Lab
Course 14.2·Lesson 2 of 3
Angles and perpendicular vectors
The formula cosθ=∣a∣∣b∣a⋅b
about 25 min1 simulation1 practice question1 Python program5 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
find the angle between two vectors, and between two lines;
test whether two vectors are perpendicular, and find the value that makes them so;
use the dot product in triangles, parallelograms and cubes.
Is the corner square?
A builder checks that a corner is a right angle by measuring. A drawing on a computer cannot be measured with a tape. It needs a test that uses numbers only. The dot product is that test.
The angle between two vectors
Rearrange the definition of the dot product:
cosθ=∣a∣∣b∣a⋅b,0≤θ≤π.
The inverse cosine gives exactly one angle in this range, so there is no choice to make. If the value is −1 the angle is π, which means the vectors point in opposite directions.
Take a cube of edge 1 with one corner at the origin. Its edges along the axes are i^, j^, k^. The diagonal of the front face is i^+j^, and the diagonal of the right face is j^+k^.
Two face diagonals.cosθ=22(1)(0)+(1)(1)+(0)(1)=21, so θ=60∘.
A body diagonal and an edge. The body diagonal is i^+j^+k^. With the edge i^, cosθ=31, so θ≈54.74∘.
Two body diagonals. The diagonals are i^+j^+k^ and i^+j^−k^. Then cosϕ=31+1−1=31 and ϕ≈70.53∘. The other angle at the centre is 180∘−70.53∘=109.47∘.
A cube in three dimensions with right-handed axes, z up, with one corner O at the origin and edge 1. A red arrow runs along the space diagonal from O to the opposite corner G. A green arrow runs along the other space diagonal from the corner C above O down to the corner H on the floor, directly under G. The two diagonals cross at the centre of the cube, marked by a purple dot, and the angle phi between them is marked there.
Perpendicular vectors
If a and b are non-zero, then
a⊥b⟺a⋅b=0.
The vectors 2i^−3j^+k^ and 4i^+j^−5k^ have dot product 8−3−5=0. So they are perpendicular. To find a missing value, put the dot product equal to zero. For a=λi^+2j^−k^ and b=3i^−j^+4k^ the condition is 3λ−2−4=0, so λ=2.
In the plane, a vector at right angles to xi^+yj^ is −yi^+xj^, because x(−y)+y(x)=0. A unit vector perpendicular to 3i^+4j^ is ±5−4i^+3j^.
Useful facts
Diagonals of a parallelogram. For a parallelogram with sides a and b, the diagonals are a+b and a−b. Their dot product is (a+b)⋅(a−b)=∣a∣2−∣b∣2. So the diagonals are perpendicular exactly when the sides are equal, which is a rhombus.
Equal diagonals.∣a+b∣=∣a−b∣ exactly when a⋅b=0. The parallelogram is then a rectangle.
A right angle in a triangle. The angle at a vertex is a right angle when the dot product of the two vectors along its sides is zero.
Direction cosines. Two lines with direction cosines l1,m1,n1 and l2,m2,n2 have cosθ=l1l2+m1m2+n1n2, because the direction cosines are the components of unit vectors.
Lines and vectors. Two lines meet in two angles that add up to 180∘. For the angle between two lines, the books take the acute one, so use cosθ=∣a∣∣b∣∣a⋅b∣. For the angle between two vectors, the angle may be obtuse, so keep the sign.
A worked example
Show that the triangle PQR with P(3,1,−1), Q(5,3,0) and R(7,−1,−5) has a right angle at P.
The sides from P.PQ=(2,2,1) and PR=(4,−2,−4).
The dot product.2(4)+2(−2)+1(−4)=8−4−4=0. So PQ⊥PR.
A check with Pythagoras.∣PQ∣2=9 and ∣PR∣2=36. QR=(2,−4,−5) has ∣QR∣2=45=9+36.
Practise with new numbers
Try it in Python
The program finds the angles of the cube in the lesson and tests a right angle.
Common mistakes
Using the angle between the lines as obtuse. For lines, take the acute angle with ∣a⋅b∣.
Forgetting to divide by both magnitudes.
Calling a vector perpendicular to itself. Only the zero vector has a⋅a=0.
Using the wrong vectors at a corner. For the angle at P use PQ and PR, both starting at P.
Taking cos−1 of a number outside [−1,1]. That means an arithmetic mistake.
Remember these
cosθ=∣a∣∣b∣a⋅b, and 0≤θ≤π.
a⊥b⟺a⋅b=0, for non-zero vectors.
(a+b)⋅(a−b)=∣a∣2−∣b∣2.
The angle between lines uses ∣a⋅b∣, so it is acute or right.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Find the angle between a=i^−j^ and b=j^−k^.
For what value of λ are a=λi^+3j^−2k^ and b=3i^−j^+3k^ perpendicular?
If ∣a∣=∣b∣, show that a+b and a−b are perpendicular.
Find a unit vector in the plane that is perpendicular to 5i^+12j^.
The dot product of two direction vectors of two lines is −6, and their magnitudes are 3 and 4. What is the angle between the two lines?
References
NCERT, Mathematics Part II for Class XII, Chapter 10, section on the scalar product and its applications.
OpenStax, Calculus Volume 3, Chapter 2, section on the dot product.
Enroll free in The Dot Product
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.
gives the angle between two vectors. Two non-zero vectors are perpendicular exactly when their dot product is zero. This tests for right angles in triangles, rhombuses and boxes, and it finds the angle between the lines of a solid.