Orthogonality and Projection Geometry

Use zero dot products to identify orthogonal directions, then decompose a vector into a projection and perpendicular residual. Interpret projection as the closest point on a line and verify the resulting Pythagorean relationship.

Orthogonality describes directions that meet at a right angle. Projection uses that relationship to split a vector into two parts: one along a chosen direction and one perpendicular to it. The part along the direction is also the closest point to the original vector on that line.

This gives three equivalent ways to understand the same construction: a component along a direction, an orthogonal decomposition, and a nearest-point problem. Each view becomes useful in a different calculation.

Orthogonal Directions

For nonzero vectors u\mathbf{u} and v\mathbf{v}:

uv=uvcosθ.\mathbf{u}\cdot\mathbf{v} =\|\mathbf{u}\|\|\mathbf{v}\|\cos\theta.

The vectors are orthogonal when θ=90\theta=90^\circ, which is equivalent to:

uv=0.\mathbf{u}\cdot\mathbf{v}=0.

The dot-product condition also holds when either vector is zero. By that algebraic definition, the zero vector is orthogonal to every vector. Its angle is not defined, however, because the angle formula would divide by its zero length. When speaking about perpendicular directions, both vectors must be nonzero.

For example, u=[2,1]T\mathbf{u}=[2,-1]^{\mathsf T} and v=[1,2]T\mathbf{v}=[1,2]^{\mathsf T} are orthogonal because:

uv=2(1)+(1)(2)=0.\mathbf{u}\cdot\mathbf{v}=2(1)+(-1)(2)=0.

Orthogonality is a statement about the chosen inner-product geometry. It does not by itself prove that two measured or learned quantities are causally or semantically unrelated.

Exercise: Verify orthogonality

Let u=[3,1]T\mathbf{u}=[3,1]^{\mathsf T} and v=[1,3]T\mathbf{v}=[1,-3]^{\mathsf T}. What is uv\mathbf{u}\cdot\mathbf{v}?

Compute it first, then check your number.

Review

Not marked done.

Your checked work will be saved automatically.

Correct records the checked result. Done is your learning status, and you can undo it.

Clearing an answer or resetting code starts the response again. It does not remove Done or Review.

Your checked work will be saved automatically.

HintUse the dot-product test

Compute 3(1)+1(3)3(1)+1(-3).

SolutionAdd the coordinate products

The dot product is:

uv=3(1)+1(3)=0.\mathbf{u}\cdot\mathbf{v}=3(1)+1(-3)=0.

Since both vectors are nonzero and their dot product is zero, they are orthogonal.

Exercise: Interpret a zero dot product carefully

Two nonzero data vectors have dot product zero. Which conclusion is justified?

Choose the supported conclusion

Select one choice, then check.

Review

Not marked done.

Your checked work will be saved automatically.

Correct records the checked result. Done is your learning status, and you can undo it.

Clearing an answer or resetting code starts the response again. It does not remove Done or Review.

Your checked work will be saved automatically.

HintSeparate geometry from interpretation

A zero dot product establishes a spatial relationship in the chosen coordinate geometry.

SolutionState only the geometric result

The vectors are orthogonal under the chosen dot product. That result does not establish causal independence, statistical independence, or a complete lack of semantic interaction.

Projection Onto a Direction

Let a\mathbf{a} be a vector and let b0\mathbf{b}\ne\mathbf{0} identify a direction. The orthogonal projection of a\mathbf{a} onto the line spanned by b\mathbf{b} is:

projb(a)=abbbb.\operatorname{proj}_{\mathbf{b}}(\mathbf{a}) = \frac{\mathbf{a}\cdot\mathbf{b}} {\mathbf{b}\cdot\mathbf{b}}\mathbf{b}.

Read this as: “measure how strongly a\mathbf{a} points along b\mathbf{b}, divide by the squared length of b\mathbf{b} to remove its arbitrary scale, and multiply the resulting coefficient by b\mathbf{b}.”

The scalar multiplier:

abbb\frac{\mathbf{a}\cdot\mathbf{b}} {\mathbf{b}\cdot\mathbf{b}}

states how many copies of b\mathbf{b} produce the projected vector. If u\mathbf{u} is a unit vector, then uu=1\mathbf{u}\cdot\mathbf{u}=1 and the formula becomes:

proju(a)=(au)u.\operatorname{proj}_{\mathbf{u}}(\mathbf{a}) =(\mathbf{a}\cdot\mathbf{u})\mathbf{u}.

The number au\mathbf{a}\cdot\mathbf{u} is the signed scalar component along the unit direction. The projection is a vector in the original space. These are related quantities with different types.

The coefficient can be derived rather than memorized. Any point on the line spanned by b\mathbf{b} has the form cbc\mathbf{b} for some scalar cc. At the projection, the residual acb\mathbf{a}-c\mathbf{b} must be orthogonal to the line:

(acb)b=0.(\mathbf{a}-c\mathbf{b})\cdot\mathbf{b}=0.

Expanding and solving for cc gives

abc(bb)=0c=abbb.\mathbf{a}\cdot\mathbf{b} -c(\mathbf{b}\cdot\mathbf{b})=0 \quad\Longrightarrow\quad c=\frac{\mathbf{a}\cdot\mathbf{b}} {\mathbf{b}\cdot\mathbf{b}}.

This is exactly the coefficient in the projection formula. It also explains why b\mathbf{b} must be nonzero and why the denominator is needed. Replacing b\mathbf{b} by a nonzero scaled copy changes the coefficient but not the projected vector; the line has not changed.

Exercise: Project onto a coordinate axis

Let a=[4,3]T\mathbf{a}=[4,3]^{\mathsf T} and let u=[1,0]T\mathbf{u}=[1,0]^{\mathsf T}. What is proju(a)\operatorname{proj}_{\mathbf{u}}(\mathbf{a})?

Choose the projected vector

Select one choice, then check.

Review

Not marked done.

Your checked work will be saved automatically.

Correct records the checked result. Done is your learning status, and you can undo it.

Clearing an answer or resetting code starts the response again. It does not remove Done or Review.

Your checked work will be saved automatically.

HintThe direction is already unit length

First compute au\mathbf{a}\cdot\mathbf{u}, then multiply that scalar by u\mathbf{u}.

SolutionKeep the horizontal component

Since u\mathbf{u} is a unit vector:

au=4,proju(a)=4[10]=[40].\mathbf{a}\cdot\mathbf{u}=4, \qquad \operatorname{proj}_{\mathbf{u}}(\mathbf{a}) =4\begin{bmatrix}1\\0\end{bmatrix} =\begin{bmatrix}4\\0\end{bmatrix}.

The number 44 is the scalar component; [4,0]T[4,0]^{\mathsf T} is the projected vector.

Exercise: Distinguish a component from a projection

For a=[4,3]T\mathbf{a}=[4,3]^{\mathsf T} and unit direction u=[1,0]T\mathbf{u}=[1,0]^{\mathsf T}, which pair is correct?

Choose the correctly typed quantities

Select one choice, then check.

Review

Not marked done.

Your checked work will be saved automatically.

Correct records the checked result. Done is your learning status, and you can undo it.

Clearing an answer or resetting code starts the response again. It does not remove Done or Review.

Your checked work will be saved automatically.

HintInspect the output type

The dot product with a unit direction is a scalar. Multiplying it by the direction produces a vector.

SolutionTrack scalar and vector outputs

The signed scalar component is au=4\mathbf{a}\cdot\mathbf{u}=4. The projection is (au)u=[4,0]T(\mathbf{a}\cdot\mathbf{u})\mathbf{u}=[4,0]^{\mathsf T}. The scalar tells how much lies along the direction; the vector shows where that component lies in the space.

Exercise: Project onto a non-unit direction

Let a=[6,2]T\mathbf{a}=[6,2]^{\mathsf T} and b=[2,0]T\mathbf{b}=[2,0]^{\mathsf T}. What is projb(a)\operatorname{proj}_{\mathbf{b}}(\mathbf{a})?

Choose the projection

Select one choice, then check.

Review

Not marked done.

Your checked work will be saved automatically.

Correct records the checked result. Done is your learning status, and you can undo it.

Clearing an answer or resetting code starts the response again. It does not remove Done or Review.

Your checked work will be saved automatically.

HintNormalize through the denominator

Compute ab=12\mathbf{a}\cdot\mathbf{b}=12 and bb=4\mathbf{b}\cdot\mathbf{b}=4 before multiplying by b\mathbf{b}.

SolutionUse the full projection formula

Because b\mathbf{b} is not a unit vector, using only ab\mathbf{a}\cdot\mathbf{b} would make the result depend incorrectly on the chosen length of b\mathbf{b}. Divide by its squared length first. The scalar multiplier is:

abbb=124=3.\frac{\mathbf{a}\cdot\mathbf{b}} {\mathbf{b}\cdot\mathbf{b}} =\frac{12}{4}=3.

Therefore:

projb(a)=3[20]=[60].\operatorname{proj}_{\mathbf{b}}(\mathbf{a}) =3\begin{bmatrix}2\\0\end{bmatrix} =\begin{bmatrix}6\\0\end{bmatrix}.

Orthogonal Decomposition and Closest Points

Define the projection p\mathbf{p} and residual r\mathbf{r} by:

p=projb(a),r=ap.\mathbf{p}=\operatorname{proj}_{\mathbf{b}}(\mathbf{a}), \qquad \mathbf{r}=\mathbf{a}-\mathbf{p}.

Then:

a=p+r,pr=0.\mathbf{a}=\mathbf{p}+\mathbf{r}, \qquad \mathbf{p}\cdot\mathbf{r}=0.

This is an orthogonal decomposition: one component lies along the selected line, and the other is perpendicular to it. Because the two parts are orthogonal, their squared lengths satisfy the Pythagorean relation:

a2=p2+r2.\|\mathbf{a}\|^2=\|\mathbf{p}\|^2+\|\mathbf{r}\|^2.

The projected point p\mathbf{p} is also the point on the line span(b)\operatorname{span}(\mathbf{b}) closest to a\mathbf{a}. Projection is therefore both a decomposition and a nearest-point operation.

To see why, take any other point on the line. It can be written as p+h\mathbf{p}+\mathbf{h}, where h\mathbf{h} lies along the line. The vector from that candidate to a\mathbf{a} is

a(p+h)=rh.\mathbf{a}-(\mathbf{p}+\mathbf{h}) =\mathbf{r}-\mathbf{h}.

The residual r\mathbf{r} is perpendicular to every vector along the line, so rh=0\mathbf{r}\cdot\mathbf{h}=0. The Pythagorean relation gives

rh2=r2+h2r2.\|\mathbf{r}-\mathbf{h}\|^2 =\|\mathbf{r}\|^2+\|\mathbf{h}\|^2 \ge \|\mathbf{r}\|^2.

Equality holds only when h=0\mathbf{h}=\mathbf{0}. Every move away from the projection along the line therefore increases the distance.

Verify an orthogonal decomposition

Edit a or the nonzero direction b. The program computes the projection and residual, then checks orthogonality and the Pythagorean identity.

Ready to run.

Exercise: Find and verify a projection residual

Let a=[4,3]T\mathbf{a}=[4,3]^{\mathsf T} and let its projection onto the horizontal axis be p=[4,0]T\mathbf{p}=[4,0]^{\mathsf T}. Which statement about the residual r=ap\mathbf{r}=\mathbf{a}-\mathbf{p} is correct?

Choose the residual and check

Select one choice, then check.

Review

Not marked done.

Your checked work will be saved automatically.

Correct records the checked result. Done is your learning status, and you can undo it.

Clearing an answer or resetting code starts the response again. It does not remove Done or Review.

Your checked work will be saved automatically.

HintSubtract, then test orthogonality

Compute [4,3]T[4,0]T[4,3]^{\mathsf T}-[4,0]^{\mathsf T} and dot the result with [4,0]T[4,0]^{\mathsf T}.

SolutionSeparate kept and omitted components

The residual is:

r=[43][40]=[03].\mathbf{r} =\begin{bmatrix}4\\3\end{bmatrix} -\begin{bmatrix}4\\0\end{bmatrix} =\begin{bmatrix}0\\3\end{bmatrix}.

Its dot product with the projection is [4,0][0,3]=0[4,0]\cdot[0,3]=0, confirming the orthogonal decomposition.

Exercise: Use the closest-point interpretation

Point a\mathbf{a} lies outside the line L=span(b)L=\operatorname{span}(\mathbf{b}). Which point on LL is closest to a\mathbf{a} in Euclidean distance?

Choose the nearest point

Select one choice, then check.

Review

Not marked done.

Your checked work will be saved automatically.

Correct records the checked result. Done is your learning status, and you can undo it.

Clearing an answer or resetting code starts the response again. It does not remove Done or Review.

Your checked work will be saved automatically.

HintLook for a perpendicular residual

Projection chooses the point whose difference from a\mathbf{a} is orthogonal to the line.

SolutionMinimize the perpendicular distance

The closest point is projb(a)\operatorname{proj}_{\mathbf{b}}(\mathbf{a}). Moving away from that point along the line adds a nonzero parallel component to the residual, increasing its Euclidean length.

Exercise: Check the Pythagorean decomposition

An orthogonal decomposition has p=4\|\mathbf{p}\|=4 and r=3\|\mathbf{r}\|=3. What is p+r\|\mathbf{p}+\mathbf{r}\|?

Compute it first, then check your number.

Review

Not marked done.

Your checked work will be saved automatically.

Correct records the checked result. Done is your learning status, and you can undo it.

Clearing an answer or resetting code starts the response again. It does not remove Done or Review.

Your checked work will be saved automatically.

HintAdd squared lengths

Since pr=0\mathbf{p}\cdot\mathbf{r}=0, use p+r2=p2+r2\|\mathbf{p}+\mathbf{r}\|^2=\|\mathbf{p}\|^2+\|\mathbf{r}\|^2.

SolutionUse orthogonality before taking the square root

The squared length is:

p+r2=42+32=25.\|\mathbf{p}+\mathbf{r}\|^2=4^2+3^2=25.

Therefore p+r=5\|\mathbf{p}+\mathbf{r}\|=5. This equality depends on the two components being orthogonal.

From Projection to Affine Geometry

Projection onto span(b)\operatorname{span}(\mathbf{b}) chooses the closest point on a line through the origin. Many geometric sets do not pass through the origin. The next lesson introduces translated, or affine, sets and uses direction and orthogonality to describe lines and hyperplanes in parametric and normal-vector forms.

Review

Not marked done.