Vectors, components and direction cosines · Mathematics… | StemPy Lab
Course 14.1·Lesson 1 of 3
Vectors, components and direction cosines
A vector has a size and a direction. We write it with components along the three axes, find its magnitude with the theorem of Pythagoras, and divide by the magnitude to get a unit vector. The direction cosines are the components of that unit vector.
about 30 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
tell a vector from a scalar, and write a vector with its components;
find the magnitude, the unit vector and the direction cosines of a vector;
use the direction angles and the rule l2+m2+n2=1.
Where is the ship?
A ship leaves a harbour. It sails 6 km north and then 8 km east. The distance it sailed is 14 km. That is one number, and it does not tell you where the ship is. The harbour master wants to know how far the ship is from the harbour, and in which direction. The straight-line distance is 10 km, and it points to the north-east side. So we need a quantity that has both a size and a direction. We call it a vector.
Scalars and vectors
A scalar has a size only. Mass, time, speed, temperature and energy are scalars. A vector has a size and a direction. Displacement, velocity, acceleration and force are vectors.
We draw a vector as an arrow. The length of the arrow is the magnitude, and the arrowhead shows the direction. The arrow AB starts at the initial pointA and ends at the terminal pointB. We write a for a vector and ∣a∣ for its magnitude. A-Level and IB books print a vector in bold, a, and write it by hand with a line under the letter. The magnitude is also called the modulus.
Some names you will meet in the Indian syllabus:
A zero vector has magnitude 0 and no direction.
A unit vector has magnitude 1. We write a^, read "a hat".
Equal vectors have the same magnitude and the same direction. Where you draw them does not matter.
The negative of a has the same magnitude and the opposite direction. We write −a.
Collinear vectors lie along the same line, or along parallel lines. They may point the same way or opposite ways.
Components
Take three axes at right angles to each other, meeting at the origin O. Let i^, j^ and k^ be unit vectors along the x, y and z axes. A-Level and IB write them as i, j, k, and often write the vector as a column of numbers. The three axes in this book are right-handed. In a picture, the z-axis points up. Turn the x-axis towards the y-axis, and a right-handed screw moves along the z-axis.
The point P(x,y,z) has the position vectorOP from the origin. We reach P in three steps: x along the x-axis, then y parallel to the y-axis, then z upwards.
OP=xi^+yj^+zk^.
The numbers x, y and z are the components of the vector.
A three-dimensional picture with a vertical z-axis, an x-axis coming towards the viewer on the left and a y-axis running to the right. A tall box stands on the floor with one corner at the origin. A thick blue arrow r runs from the origin to the opposite top corner, the point P(2, 3, 6). The same journey is shown in three steps: a red arrow 2i along the x-axis, a green arrow 3j parallel to the y-axis, and an orange arrow 6k straight up.
Magnitude
Use Pythagoras twice. The diagonal of the floor is x2+y2. The vector OP is the diagonal of a vertical rectangle with that floor diagonal and the height z as its sides. So
∣OP∣=x2+y2+z2.
For P(2,3,6) the floor diagonal is 13, and ∣OP∣=13+36=49=7.
Unit vector
To get a vector of size 1 in the direction of a, divide a by its own magnitude:
a^=∣a∣a.
For a=2i^+3j^+6k^ we get a^=72i^+73j^+76k^. A vector of magnitude m in the same direction is ma^.
Direction cosines
The vector r makes the angles α, β and γ with the positive x, y and z axes. These are the direction angles, and each lies between 0 and π.
A three-dimensional picture with right-handed axes, z up, x towards the viewer and y to the right. A thick blue arrow runs from the origin to the point P(2, 3, 6). Three coloured arcs at the origin mark the angles between this arrow and the axes: alpha in red with the x-axis, beta in green with the y-axis and gamma in orange with the z-axis. Gamma is the smallest of the three, because the arrow is steep.
In the right-angled triangle of the figure, the component along an axis equals ∣r∣ times the cosine of the angle with that axis. So x=∣r∣cosα. The three numbers
l=cosα=∣r∣x,m=cosβ=∣r∣y,n=cosγ=∣r∣z
are the direction cosines. They are the components of the unit vector, r^=li^+mj^+nk^. Since r^ has magnitude 1,
l2+m2+n2=1.
Any three numbers proportional to l, m, n are called direction ratios. For example, the direction ratios 6,−6,3 are the same as 2,−2,1. Divide by 4+4+1=3 to get the direction cosines 32,−32,31.
A vector has one set of direction cosines. A line has two sets, because it can be followed in either direction, and the second set has all three signs changed. A negative cosine means an obtuse angle. A-Level and IB courses usually find these angles with the dot product, which is the next course of this chapter.
A worked example
Find the magnitude, the unit vector and the direction angles of a=i^−2j^+2k^.
Magnitude.1+4+4=3.
Unit vector.a^=31i^−32j^+32k^. The direction cosines are 31, −32 and 32. Their squares add to 91+4+4=1.
Angles.α=cos−131≈70.53∘. β=cos−1(−32)≈131.81∘, which is obtuse because the y-component is negative. γ=cos−132≈48.19∘.
Practise with new numbers
Try it in Python
The program finds the magnitude, the unit vector and the direction angles of 2i^+3j^+6k^ and checks that l2+m2+n2=1.
Common mistakes
Forgetting the square root. The magnitude of 3i^+4j^ is 5, not 25.
Adding the components. The size of 2i^+3j^+6k^ is 7, not 11.
Mixing up a unit vector and a vector of length one in any direction. The unit vector must point along the given vector.
Dropping a sign. A negative component gives a negative direction cosine and an obtuse angle.
Thinking the three angles add up to a fixed number. It is the squares of the cosines that add up to 1.
Remember these
A vector has a magnitude and a direction. A scalar has a magnitude only.
OP=xi^+yj^+zk^ and ∣OP∣=x2+y2+z2.
a^=∣a∣a, and its components are the direction cosines l,m,n.
l2+m2+n2=1.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Which of these are vectors: mass, velocity, temperature, force, speed?
Find the magnitude of 6i^+2j^−3k^.
Find the unit vector along 8i^−j^−4k^.
A line makes 60∘ with the x-axis and 60∘ with the y-axis. What angle can it make with the z-axis?
Can 0.6, 0.8 and 0.2 be the direction cosines of a line?
References
NCERT, Mathematics Part II for Class XII, Chapter 10, sections on some basic concepts and on direction cosines.
OpenStax, Calculus Volume 3, Chapter 2, sections on vectors in the plane and vectors in three dimensions.
Enroll free in Vectors and Their Algebra
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.