MATH 133 Linear Algebra and Geometry • McGill University, Montreal

Revision sheet: dot product, projections and planes (MATH 133)

This sheet is not a summary of section 4.2 of Nicholson: you already have the course notes. It answers one question only, what makes students lose marks on the dot product, projections and planes in MATH 133 at McGill University, and which precise gesture avoids each loss.

Almost every error in this chapter is the same error in a different place: projecting on the wrong direction, or keeping the wrong half of the projection. Learn the two pictures in the first block and most of the traps below stop being traps.

The thread of the chapter

Every length and every angle in this chapter is a projection onto one well-chosen direction. For a line you project on its direction d\mathbf{d} and keep what is LEFT; for a plane you project on its normal n\mathbf{n} and keep the PROJECTION. A plane is known by its normal, never by a vector lying in it.

This chapter is part of MATH 133, Linear Algebra and Geometry (McGill)

The essentials

The dot product, the projection, and the two halves

  • • u⋅v=u1v1+u2v2+u3v3=∥u∥ ∥v∥cos⁡θ\mathbf{u} \cdot \mathbf{v} = u_1v_1 + u_2v_2 + u_3v_3 = \|\mathbf{u}\|\,\|\mathbf{v}\|\cos\theta, a NUMBER, with θ∈[0,π]\theta \in [0, \pi]. Its sign gives the type of angle: positive acute, zero right, negative obtuse.
  • • u⋅v=0\mathbf{u} \cdot \mathbf{v} = 0 with both vectors non-zero means ORTHOGONAL. It never means that one of them is zero.
  • • Projection on v\mathbf{v}: proj⁡vu=u⋅v∥v∥2 v\operatorname{proj}_{\mathbf{v}}\mathbf{u} = \dfrac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{v}\|^2}\,\mathbf{v}, a VECTOR along v\mathbf{v}. Scalar component: u⋅v∥v∥\dfrac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{v}\|}, a signed number.
  • • The leftover u−proj⁡vu\mathbf{u} - \operatorname{proj}_{\mathbf{v}}\mathbf{u} is orthogonal to v\mathbf{v}, and ∥u∥2=∥proj⁡vu∥2+∥u−proj⁡vu∥2\|\mathbf{u}\|^2 = \|\operatorname{proj}_{\mathbf{v}}\mathbf{u}\|^2 + \|\mathbf{u} - \operatorname{proj}_{\mathbf{v}}\mathbf{u}\|^2.
  • • Distance from QQ to a LINE through PP with direction d\mathbf{d}: project PQ→\overrightarrow{PQ} on d\mathbf{d} and take the length of the LEFTOVER. Distance from QQ to a PLANE through PP with normal n\mathbf{n}: project PQ→\overrightarrow{PQ} on n\mathbf{n} and take the length of the PROJECTION.
PQddistanceLline: keep what is LEFTPQndistanceΠplane: keep the PROJECTION
Same PP and QQ, two objects. For the line, the part of PQ→\overrightarrow{PQ} along d\mathbf{d} is thrown away and the leftover is the distance; for the plane, the part along n\mathbf{n} IS the distance.

The point PP used to describe the line or the plane is arbitrary, so a correct distance never depends on it. That is the test for which half to keep: the leftover for a line, the projection on n\mathbf{n} for a plane, are the two quantities that do not move when PP moves.

A plane is a point and a normal

  • • Plane through PP with normal n=(a,b,c)\mathbf{n} = (a, b, c): n⋅(X−P)=0\mathbf{n} \cdot (X - P) = 0, that is ax+by+cz=dax + by + cz = d with d=n⋅Pd = \mathbf{n} \cdot P. The coefficients of xx, yy, zz ARE the normal, once everything is on the left.
  • • Plane perpendicular to a line: normal == direction of the line. Plane parallel to a given plane: SAME normal, new dd.
  • • Two planes: proportional normals means parallel or identical; otherwise the angle between the planes is cos⁡θ=∣n1⋅n2∣∥n1∥ ∥n2∥\cos\theta = \dfrac{|\mathbf{n}_1 \cdot \mathbf{n}_2|}{\|\mathbf{n}_1\|\,\|\mathbf{n}_2\|}, acute. Perpendicular planes: n1⋅n2=0\mathbf{n}_1 \cdot \mathbf{n}_2 = 0.
  • • Line P+tdP + t\mathbf{d} and plane: d⋅n≠0\mathbf{d} \cdot \mathbf{n} \neq 0 gives exactly one point; d⋅n=0\mathbf{d} \cdot \mathbf{n} = 0 gives a line PARALLEL to the plane, inside it or not depending on whether PP satisfies the equation.
  • • Distance from (x0,y0,z0)(x_0, y_0, z_0) to ax+by+cz=dax + by + cz = d: ∣ax0+by0+cz0−d∣a2+b2+c2\dfrac{|ax_0 + by_0 + cz_0 - d|}{\sqrt{a^2 + b^2 + c^2}}. Between parallel planes ax+by+cz=d1ax + by + cz = d_1 and ax+by+cz=d2ax + by + cz = d_2 with the SAME (a,b,c)(a, b, c): ∣d1−d2∣a2+b2+c2\dfrac{|d_1 - d_2|}{\sqrt{a^2 + b^2 + c^2}}.

No three-point plane and no line of intersection of two planes here: both need the cross product, which is the next chapter.

The mistakes that cost marks

These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.

1. Dividing by the length instead of its square in a projection

2 marks, and every distance computed from it

What not to write

“proj⁡vu=u⋅v∥v∥ v=83(1,2,2)\operatorname{proj}_{\mathbf{v}}\mathbf{u} = \dfrac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{v}\|}\,\mathbf{v} = \dfrac{8}{3}(1, 2, 2) for u=(4,0,2)\mathbf{u} = (4, 0, 2), v=(1,2,2)\mathbf{v} = (1, 2, 2).”

What to write

“proj⁡vu=u⋅v∥v∥2 v=89(1,2,2)\operatorname{proj}_{\mathbf{v}}\mathbf{u} = \dfrac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{v}\|^2}\,\mathbf{v} = \dfrac{8}{9}(1, 2, 2).”

Why: The wrong version changes when v\mathbf{v} is doubled, and a shadow on a line cannot depend on which arrow names the line. With ∥v∥2\|\mathbf{v}\|^2 the scale factor appears twice on top and twice below and cancels. The check: u−proj⁡vu\mathbf{u} - \operatorname{proj}_{\mathbf{v}}\mathbf{u} must dot to zero with v\mathbf{v}.

2. Taking the length of the projection for the distance to a line

the whole part

What not to write

“The line through the origin with direction (2,1,2)(2, 1, 2) and Q=(5,4,2)Q = (5, 4, 2): proj⁡dOQ→=(4,2,4)\operatorname{proj}_{\mathbf{d}}\overrightarrow{OQ} = (4, 2, 4), so the distance is 66.”

What to write

“The leftover is (5,4,2)−(4,2,4)=(1,2,−2)(5, 4, 2) - (4, 2, 4) = (1, 2, -2), orthogonal to d\mathbf{d}, so the distance is 33 and the closest point is (4,2,4)(4, 2, 4).”

Why: The projection tells you WHERE to stop on the line; it measures a length ALONG the line, which depends on the chosen point. The distance is the other side of the right triangle, and Pythagoras checks it: 45=36+945 = 36 + 9.

3. Forgetting the denominator in the distance to a plane

2 marks

What not to write

“Distance from (1,2,3)(1, 2, 3) to 2x−y+2z=12x - y + 2z = 1: ∣2−2+6−1∣=5|2 - 2 + 6 - 1| = 5.”

What to write

“∣2−2+6−1∣4+1+4=53\dfrac{|2 - 2 + 6 - 1|}{\sqrt{4 + 1 + 4}} = \dfrac{5}{3}.”

Why: The numerator is the scalar component multiplied by ∥n∥\|\mathbf{n}\|. Multiply the equation by 22 and the wrong answer doubles while the plane has not moved: dividing by ∥n∥\|\mathbf{n}\| is what makes the distance independent of how the equation is written.

4. Subtracting right-hand sides of parallel planes whose normals differ

the whole part

What not to write

“x−2y+2z=1x - 2y + 2z = 1 and 3x−6y+6z=213x - 6y + 6z = 21 are ∣21−1∣3=203\dfrac{|21 - 1|}{3} = \dfrac{20}{3} apart.”

What to write

“Dividing the second by 33: x−2y+2z=7x - 2y + 2z = 7. Same normal, so the distance is ∣7−1∣3=2\dfrac{|7 - 1|}{3} = 2.”

Why: The formula ∣d1−d2∣∥n∥\dfrac{|d_1 - d_2|}{\|\mathbf{n}\|} holds only when both equations use the SAME (a,b,c)(a, b, c). The safe route needs no rescaling: take one point of the first plane, here (1,0,0)(1, 0, 0), and use the point-to-plane formula on the second, ∣3−21∣9=2\dfrac{|3 - 21|}{9} = 2.

5. Reading a zero dot product between a line and a normal as perpendicular

the whole part, and every part built on it

What not to write

“(1,1,0)⋅(1,−1,5)=0(1, 1, 0) \cdot (1, -1, 5) = 0, so the line (0,0,1)+t(1,1,0)(0, 0, 1) + t(1, 1, 0) is perpendicular to the plane x−y+5z=2x - y + 5z = 2.”

What to write

“d⋅n=0\mathbf{d} \cdot \mathbf{n} = 0, so the line is PARALLEL to the plane. Its point (0,0,1)(0, 0, 1) gives 5≠25 \neq 2, so it does not meet the plane.”

Why: d\mathbf{d} is orthogonal to the NORMAL, so it lies along the plane. Perpendicular to the plane would mean d\mathbf{d} is a multiple of n\mathbf{n}. And parallel is not the end of the answer: one substitution decides between no point and the whole line.

6. Giving the obtuse angle between two planes

1 mark

What not to write

“n1=(1,0,1)\mathbf{n}_1 = (1, 0, 1), n2=(−1,1,0)\mathbf{n}_2 = (-1, 1, 0), cos⁡θ=−12\cos\theta = -\frac{1}{2}, so the planes make 120∘120^{\circ}.”

What to write

“cos⁡θ=∣n1⋅n2∣∥n1∥ ∥n2∥=12\cos\theta = \dfrac{|\mathbf{n}_1 \cdot \mathbf{n}_2|}{\|\mathbf{n}_1\|\,\|\mathbf{n}_2\|} = \dfrac{1}{2}, so the planes make 60∘60^{\circ}.”

Why: The sign of a normal is arbitrary: writing the second plane with (1,−1,0)(1, -1, 0) describes the same plane and gives +12+\frac{1}{2}. The angle between two vectors lives in [0,π][0, \pi]; the angle between two planes, like the angle between two lines, is the acute one.

7. Taking a vertical gap for the distance to a slanted plane

2 marks

What not to write

“The roof 3y+4z=243y + 4z = 24 is at z=5.25z = 5.25 above Q=(2,1,4)Q = (2, 1, 4), so QQ is 1.251.25 m from the roof.”

What to write

“∣3+16−24∣5=1\dfrac{|3 + 16 - 24|}{5} = 1 m. The vertical gap, 1.251.25 m, is longer, by the factor 1cos⁡θ=54\dfrac{1}{\cos\theta} = \dfrac{5}{4}.”

Q1.251roof 3y + 4z = 24
From QQ, the dashed vertical segment meets the roof after 1.251.25 m, but the solid segment along the normal reaches it after only 11 m, at a right angle.

Why: The shortest segment to a plane runs along the NORMAL, not along the zz-axis. The two agree only for a horizontal plane, where n\mathbf{n} is vertical, which is exactly the one case where no formula was needed.

8. Reading the normal off an equation that is not in standard form

1 mark, plus every angle and distance computed with it

What not to write

“The plane z=3x−2y+1z = 3x - 2y + 1 has normal (3,−2,1)(3, -2, 1).”

What to write

“Rewritten as 3x−2y−z=−13x - 2y - z = -1, the plane has normal (3,−2,−1)(3, -2, -1).”

Why: The normal is read only once xx, yy and zz are all on the left and the constant is alone on the right. The 11 in the faux line is the constant, not a coordinate of anything, and the coefficient of zz is −1-1, not missing.

Which method to choose

Which projection the question is asking for

Read what the statement gives, a line, a plane or two vectors, before choosing a formula

d · n ≠ 0one pointd · n = 0, P off Πno pointd · n = 0, P on Πthe whole line
Left: d⋅n≠0\mathbf{d} \cdot \mathbf{n} \neq 0, the line pierces the plane once. Middle and right: d⋅n=0\mathbf{d} \cdot \mathbf{n} = 0 in both, and only a point of the line tells none from all.
  • If two vectors and the word angle → cos⁡θ=u⋅v∥u∥ ∥v∥\cos\theta = \dfrac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\|\,\|\mathbf{v}\|}; the sign alone if only acute or obtuse is asked

    Example: (2,1,−2)⋅(1,1,0)=3(2, 1, -2) \cdot (1, 1, 0) = 3 over 323\sqrt{2} gives π4\frac{\pi}{4}

  • If a point and a LINE P+tdP + t\mathbf{d} → project PQ→\overrightarrow{PQ} on d\mathbf{d}: the projection gives the closest point, the LEFTOVER gives the distance

    Example: (5,4,2)(5, 4, 2) and d=(2,1,2)\mathbf{d} = (2, 1, 2): closest point (4,2,4)(4, 2, 4), distance 33

  • If a point and a PLANE ax+by+cz=dax + by + cz = d → project on n\mathbf{n}: distance ∣ax0+by0+cz0−d∣∥n∥\dfrac{|ax_0 + by_0 + cz_0 - d|}{\|\mathbf{n}\|}, foot Q−n⋅Q−d∥n∥2nQ - \dfrac{\mathbf{n} \cdot Q - d}{\|\mathbf{n}\|^2}\mathbf{n}

    Example: (2,4,5)(2, 4, 5) and x+2y+2z=2x + 2y + 2z = 2: distance 66, foot (0,0,1)(0, 0, 1)

  • If a line and a plane → compute d⋅n\mathbf{d} \cdot \mathbf{n} FIRST; non-zero, substitute and solve for tt; zero, test one point

    Example: d⋅n=4\mathbf{d} \cdot \mathbf{n} = 4, then 4t+2=64t + 2 = 6 gives t=1t = 1

  • If two planes → compare the normals: proportional, rescale and compute a distance; otherwise the acute angle from ∣n1⋅n2∣|\mathbf{n}_1 \cdot \mathbf{n}_2|

    Example: (1,0,−1)(1, 0, -1) and (0,1,−1)(0, 1, -1): cos⁡θ=12\cos\theta = \frac{1}{2}, so 60∘60^{\circ}

If a question seems to need a vector lying IN a plane, or two planes meeting in a line, it belongs to the cross product chapter: nothing on this sheet produces a normal from two directions.

How the answer is expected to be written

A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.

Distance from a point to a plane, justified

When to use it: Any question that says derive, justify or show, or that gives the plane by a point and a normal

  1. 1 Read the normal n\mathbf{n} from the equation written as ax+by+cz=dax + by + cz = d, and compute ∥n∥\|\mathbf{n}\|.
  2. 2 Name a point PP of the plane and CHECK it in the equation, in one line.
  3. 3 Compute PQ→\overrightarrow{PQ} and PQ→⋅n\overrightarrow{PQ} \cdot \mathbf{n}.
  4. 4 State the reason: the distance is the length of the projection of PQ→\overrightarrow{PQ} on n\mathbf{n}, because the normal is the direction that leaves the plane fastest.
  5. 5 Conclude with ∣PQ→⋅n∣∥n∥\dfrac{|\overrightarrow{PQ} \cdot \mathbf{n}|}{\|\mathbf{n}\|} and, if asked, the foot F=Q−PQ→⋅n∥n∥2 nF = Q - \dfrac{\overrightarrow{PQ} \cdot \mathbf{n}}{\|\mathbf{n}\|^2}\,\mathbf{n}, checked in the equation.

Concluding sentence

“The distance from QQ to the plane is the length of the projection of PQ→\overrightarrow{PQ} on the normal: ∣PQ→⋅n∣∥n∥=93=3\dfrac{|\overrightarrow{PQ} \cdot \mathbf{n}|}{\|\mathbf{n}\|} = \dfrac{9}{3} = 3.”

The trap: Writing the distance as ∥PQ→∥\|\overrightarrow{PQ}\|. The point PP was arbitrary, so its distance to QQ means nothing; only the component along n\mathbf{n} does.

Marking: Typically 1 mark for the normal and a checked point, 1 for the projection argument in words, 1 for the computation, and 1 for the foot checked in the equation. A bare formula with the right number earns the computation mark only.

Check before you hand in

Five minutes of checking recover more marks than one more problem started in a hurry.

The typical problem, taken apart

The point of a plane closest to a given point

Find the distance from Q=(2,4,5)Q = (2, 4, 5) to the plane Π:x+2y+2z=2\Pi: x + 2y + 2z = 2, the point FF of Π\Pi closest to QQ, and the equation of the plane through QQ parallel to Π\Pi.

Step 1

Normal n=(1,2,2)\mathbf{n} = (1, 2, 2), ∥n∥=3\|\mathbf{n}\| = 3. A point of Π\Pi: P=(2,0,0)P = (2, 0, 0), since 2+0+0=22 + 0 + 0 = 2.

Why

Reading n\mathbf{n} first fixes the direction of every later move. Checking PP in the equation costs one line and protects the whole computation from a point that is not on the plane.

Step 2

PQ→=(0,4,5)\overrightarrow{PQ} = (0, 4, 5) and PQ→⋅n=0+8+10=18\overrightarrow{PQ} \cdot \mathbf{n} = 0 + 8 + 10 = 18.

Why

This one number carries everything: its sign says which side QQ is on, its size over ∥n∥\|\mathbf{n}\| gives the distance, and its size over ∥n∥2\|\mathbf{n}\|^2 gives the step back to the foot.

Step 3

Distance =183=6= \dfrac{18}{3} = 6. The formula agrees: ∣2+8+10−2∣3=6\dfrac{|2 + 8 + 10 - 2|}{3} = 6.

Why

Writing the projection argument and then the formula shows the marker both the reason and the result; the agreement of the two is the first verification.

Step 4

F=Q−189 n=(2,4,5)−(2,4,4)=(0,0,1)F = Q - \dfrac{18}{9}\,\mathbf{n} = (2, 4, 5) - (2, 4, 4) = (0, 0, 1). Check: 0+0+2=20 + 0 + 2 = 2, and FQ→=(2,4,4)=2n\overrightarrow{FQ} = (2, 4, 4) = 2\mathbf{n}, of length 66.

Why

The step back uses ∥n∥2=9\|\mathbf{n}\|^2 = 9, not ∥n∥=3\|\mathbf{n}\| = 3, because it multiplies the vector n\mathbf{n}, which already has length 33. The substitution in Π\Pi is what proves it.

Step 5

Parallel plane through QQ: same normal, x+2y+2z=2+8+10=20x + 2y + 2z = 2 + 8 + 10 = 20. Distance between the two planes: ∣20−2∣3=6\dfrac{|20 - 2|}{3} = 6.

Why

This is a free cross-check: the plane through QQ parallel to Π\Pi is at exactly the distance from QQ to Π\Pi, and the two numbers must agree.

The conclusion, written out

“QQ is at distance 66 from Π\Pi, the closest point is F=(0,0,1)F = (0, 0, 1), and the plane through QQ parallel to Π\Pi is x+2y+2z=20x + 2y + 2z = 20.”

The classic mistake on this problem: Stepping back by 183n=(6,12,12)\frac{18}{3}\mathbf{n} = (6, 12, 12) gives F=(−4,−8,−7)F = (-4, -8, -7), which gives −4−16−14=−34≠2-4 - 16 - 14 = -34 \neq 2 in the equation: the foot is off the plane, and the substitution says so at once.

Learn by heart

  • • u⋅v=∥u∥ ∥v∥cos⁡θ\mathbf{u} \cdot \mathbf{v} = \|\mathbf{u}\|\,\|\mathbf{v}\|\cos\theta; zero means ORTHOGONAL, never that a vector is zero.
  • • proj⁡vu=u⋅v∥v∥2 v\operatorname{proj}_{\mathbf{v}}\mathbf{u} = \dfrac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{v}\|^2}\,\mathbf{v}: the SQUARE of the length below.
  • • Distance to a line: project on d\mathbf{d}, keep the LEFTOVER. Distance to a plane: project on n\mathbf{n}, keep the PROJECTION.
  • • ax+by+cz=dax + by + cz = d has normal (a,b,c)(a, b, c), read only when everything is on the left.
  • • Line and plane: d⋅n≠0\mathbf{d} \cdot \mathbf{n} \neq 0, one point; d⋅n=0\mathbf{d} \cdot \mathbf{n} = 0, PARALLEL, then test one point.
  • • Distance to a plane =∣ax0+by0+cz0−d∣a2+b2+c2= \dfrac{|ax_0 + by_0 + cz_0 - d|}{\sqrt{a^2 + b^2 + c^2}}; parallel planes only after making the normals EQUAL.
  • • Angle between planes == angle between normals, with ∣n1⋅n2∣|\mathbf{n}_1 \cdot \mathbf{n}_2|: always acute.

Frequently asked questions

What is the difference between the projection and the scalar component?

The projection of u on v is a vector: it points along v and has the length of the shadow of u on that line. The scalar component is a single signed number, the dot product divided by the length of v. Its absolute value is the length of the projection, and its sign says whether the shadow points with v or against it.

How do I find the distance from a point to a plane in MATH 133?

Write the plane as ax plus by plus cz equals d, so that its normal is (a, b, c). Substitute the point into the left side, subtract d, take the absolute value, and divide by the length of the normal. The justification asked in exams is that this is the length of the projection, on the normal, of any vector joining a point of the plane to the given point.

Why do we use the normal vectors to find the angle between two planes?

Because a plane contains infinitely many directions but has only one normal direction. Each normal stands at a right angle on its plane, so turning one plane onto the other turns the normals by the same angle. Take the absolute value of the dot product of the normals so that the answer is the acute angle, since the sign of a normal is arbitrary.

How can I tell if a line is parallel to a plane or lies in it?

Compute the dot product of the direction of the line with the normal of the plane. If it is not zero, the line crosses the plane in exactly one point. If it is zero, the line is parallel to the plane, and you substitute one point of the line into the equation: if the point satisfies it the whole line lies in the plane, otherwise the line never meets it.

Practise it

Corrected exercises: Dot product, projections and planes, MATH 133 at McGill

A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.

  • 10 corrected exercises
  • 100 points
  • 150 minutes
Do the exercises
Previous sheet Vectors and lines in space Next sheet Cross product, areas and volumes

See also

Looking for a MATH 133 tutor in Montreal?

Get in touch for a first session. The geometry half of MATH 133 becomes short once every distance is read as one projection on the right vector.

Site by Studio Squalli