Length, Projection, and Vector Coordinates

For v=(v1,…,vn)\mathbf v=(v_1,\ldots,v_n), the Euclidean norm is


∥v∥=v⋅v=v12+⋯+vn2.\|\mathbf v\|=\sqrt{\mathbf v\cdot\mathbf v}=\sqrt{v_1^2+\cdots+v_n^2}.


The norm is a nonnegative length, and squaring the components is what makes signs irrelevant to it. The dot product also detects perpendicularity: nonzero vectors u\mathbf u and v\mathbf v are perpendicular exactly when u⋅v=0\mathbf u\cdot\mathbf v=0. More generally cos⁡θ=u⋅v∥u∥ ∥v∥\cos\theta=\dfrac{\mathbf u\cdot\mathbf v}{\|\mathbf u\|\,\|\mathbf v\|}, and the perpendicular case is just cos⁡θ=0\cos\theta=0.

Projection

The projection of b\mathbf b onto a nonzero vector u\mathbf u is


proj⁡ub=b⋅uu⋅uu.\operatorname{proj}_{\mathbf u}\mathbf b=\frac{\mathbf b\cdot\mathbf u}{\mathbf u\cdot\mathbf u}\mathbf u.


The scalar coefficient measures how many copies of u\mathbf u are needed; multiplying it by u\mathbf u gives the projected vector, so the coefficient and the projection are different objects and a question asks for one or the other. The residual r=b−proj⁡ub\mathbf r=\mathbf b-\operatorname{proj}_{\mathbf u}\mathbf b is perpendicular to u\mathbf u, which makes the projection the point on the line spanned by u\mathbf u closest to b\mathbf b.

A vector b decomposed into a projection p along the span of u and a residual r perpendicular to it. The three vectors form a right triangle with the right angle at the tip of p, which is the foot of the perpendicular from the tip of b. The arrow for u is drawn slightly to one side of the line so that it stays visible beneath p, which lies along the same direction.

A vector b decomposed into a projection p along the span of u and a residual r perpendicular to it. The three vectors form a right triangle with the right angle at the tip of p, which is the foot of the perpendicular from the tip of b. The arrow for u is drawn slightly to one side of the line so that it stays visible beneath p, which lies along the same direction.

Squared distance from b to the point t·u on a line

Squared distance from b to the point t·u on a line


Because p\mathbf p and r\mathbf r are perpendicular and sum to b\mathbf b, they obey Pythagoras: ∥b∥2=∥p∥2+∥r∥2\|\mathbf b\|^2=\|\mathbf p\|^2+\|\mathbf r\|^2. That identity is a fast check on any decomposition, and it shows why ∥r∥≤∥b∥\|\mathbf r\|\le\|\mathbf b\| always, with equality only when the projection is zero.

Worked example

Let b=(2,4)\mathbf b=(2,4) and u=(1,3)\mathbf u=(1,3). Then b⋅u=2+12=14\mathbf b\cdot\mathbf u=2+12=14 and u⋅u=1+9=10\mathbf u\cdot\mathbf u=1+9=10, so the projection coefficient is 14/10=7/514/10=7/5. Thus p=(7/5)(1,3)=(7/5,21/5)\mathbf p=(7/5)(1,3)=(7/5,21/5). The residual is r=b−p=(3/5,−1/5)\mathbf r=\mathbf b-\mathbf p=(3/5,-1/5), and r⋅u=3/5−3/5=0\mathbf r\cdot\mathbf u=3/5-3/5=0, verifying perpendicularity. Pythagoras agrees: ∥p∥2=49+44125=985\|\mathbf p\|^2=\frac{49+441}{25}=\frac{98}{5} and ∥r∥2=9+125=25\|\mathbf r\|^2=\frac{9+1}{25}=\frac{2}{5}, which sum to 20=∥b∥2=4+1620=\|\mathbf b\|^2=4+16.

Coordinates in a basis

Coordinates depend on a chosen ordered basis. If B=(b1,…,bn)\mathcal B=(\mathbf b_1,\ldots,\mathbf b_n), then [v]B=(c1,…,cn)[\mathbf v]_{\mathcal B}=(c_1,\ldots,c_n) means v=c1b1+⋯+cnbn\mathbf v=c_1\mathbf b_1+\cdots+c_n\mathbf b_n. The coordinate list generally differs from the standard-component list.


The lists agree for every vector exactly when B\mathcal B is the standard basis, but they can also agree for an individual vector in a nonstandard basis. For example, in the ordered basis B=((1,0),(1,1))\mathcal B=((1,0),(1,1)), the vector v=(1,0)\mathbf v=(1,0) has [v]B=(1,0)[\mathbf v]_{\mathcal B}=(1,0), the same list as its standard components.


When the basis vectors are mutually perpendicular the coefficients decouple, and each one is just a projection coefficient: ci=v⋅bibi⋅bic_i=\dfrac{\mathbf v\cdot\mathbf b_i}{\mathbf b_i\cdot\mathbf b_i}, with no system to solve. For B=((2,1),(−1,2))\mathcal B=((2,1),(-1,2)), which is orthogonal since 2(−1)+1(2)=02(-1)+1(2)=0, and v=(0,5)\mathbf v=(0,5): c1=0+55=1c_1=\frac{0+5}{5}=1 and c2=0+105=2c_2=\frac{0+10}{5}=2. Checking, 1(2,1)+2(−1,2)=(0,5)1(2,1)+2(-1,2)=(0,5). Without orthogonality the same coefficients would require solving a linear system.



What is the Euclidean norm of v=(9,−40)\mathbf v=(9,-40)?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

In the decomposition illustrated by the figure, let b=(5,1)\mathbf b=(5,1) and u=(2,−1)\mathbf u=(2,-1). Find the scalar coefficient multiplying u\mathbf u in proj⁡ub\operatorname{proj}_{\mathbf u}\mathbf b.

Give your answer as a number.

A vector b decomposed into a projection p along the span of u and a residual r perpendicular to it. The three vectors form a right triangle with the right angle at the tip of p, which is the foot of the perpendicular from the tip of b. The arrow for u is drawn slightly to one side of the line so that it stays visible beneath p, which lies along the same direction.

A vector b decomposed into a projection p along the span of u and a residual r perpendicular to it. The three vectors form a right triangle with the right angle at the tip of p, which is the foot of the perpendicular from the tip of b. The arrow for u is drawn slightly to one side of the line so that it stays visible beneath p, which lies along the same direction.

Squared distance from b to the point t·u on a line

Squared distance from b to the point t·u on a line

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

In the figure, p=proj⁡ub\mathbf p=\operatorname{proj}_{\mathbf u}\mathbf b and r=b−p\mathbf r=\mathbf b-\mathbf p. Which identity must hold?

A vector b decomposed into a projection p along the span of u and a residual r perpendicular to it. The three vectors form a right triangle with the right angle at the tip of p, which is the foot of the perpendicular from the tip of b. The arrow for u is drawn slightly to one side of the line so that it stays visible beneath p, which lies along the same direction.

A vector b decomposed into a projection p along the span of u and a residual r perpendicular to it. The three vectors form a right triangle with the right angle at the tip of p, which is the foot of the perpendicular from the tip of b. The arrow for u is drawn slightly to one side of the line so that it stays visible beneath p, which lies along the same direction.

Squared distance from b to the point t·u on a line

Squared distance from b to the point t·u on a line

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors