Skip to content

Orthogonal and orthonormal basis ​

Introduction ​

An orthogonal basis is a basis of a vector space where all the vectors are linearly independent and orthogonal to each other (i.e., the dot product of any two vectors is 0).

An orthonormal basis is a basis of a vector space where all the vectors are orthogonal to each other and have a length of 1.

Scalar product ​

The scalar product of two vectors is calculated using the following formula:

⟨u,v⟩=u⋅v=∑i=1nui⋅vi

where u, v are vectors.

Example ​

Let

u=[123], v=[456]

be vectors. The scalar product of u and v is calculated using the following formula:

⟨u,v⟩=u⋅v=1⋅4+2⋅5+3⋅6=4+10+18=32

The scalar product of u and v is 32.

Orthogonal basis ​

Basis of vector space can be orthogonalized using the Gram-Schmidt process. To transform the basis into orthogonal basis we need to project each vector onto the subspace orthogonal to the previous vectors.

Given v1,v2,v3 which are non orthogonal independent vectors, we can calculate the orthogonal basis b1,b2,b3 following these steps:

So, let:

v1,v2,v3:non orthogonalW=span(v1,v2,v3):vector spaceB={v1,v2,v3}:basis of W---b1,b2,b3:orthogonalBo={b1,b2,b3}:orthogonal basis of W

We need to find b1,b2,b3:

Let:

b1=v1(assume that of the vectors is on the first orthogonal axis) 

then:

v2′=b2=v2−horizontal correction=v2−⟨v2,b1⟩⟨b1,b1⟩⋅b1

and therefore:

v3′=b3=v3−⟨v3,b1⟩⟨b1,b1⟩⋅b1−⟨v3,b2⟩⟨b2,b2⟩⋅b2

Example ​

Let

v1=[11−10], v2=[111−1], v3=[2121]

be vectors. The orthogonal basis of v1,v2,v3 is calculated using the following steps:

b1=v1=[11−10]- - -b2=v2−⟨v2,b1⟩⟨b1,b1⟩⋅b1=[111−1]−1⋅1+1⋅1+1⋅(−1)+(−1)⋅01⋅1+1⋅1+(−1)⋅(−1)+0⋅0⋅[11−10]==[111−1]−13⋅[11−10]=[232343−1]b2=[232343−1]- - -b3=v3−⟨v3,b1⟩⟨b1,b1⟩⋅b1−⟨v3,b2⟩⟨b2,b2⟩⋅b2==[2121]−13⋅[11−10]−2⋅23+1⋅23+2⋅43+1⋅(−1)23⋅23+23⋅23+43⋅43+(−1)⋅(−1)⋅[232343−1]==[2121]−[1313−130]−113339⋅[232343−1]=[2121]−[1313−130]−[232343−1]=[2121]−[111−1]b3=[1012]

The orthogonal basis of v1,v2,v3 is:

Bo={[11−10],[232343−1],[1012]}

Orthonormal basis ​

Orthogonal basis can be transformed into orthonormal basis by normalizing each vector in the basis.

Given b1,b2,b3 which are orthogonal independent vectors, we can calculate the orthonormal basis e1,e2,e3 following these steps:

So, if

b1,b2,b3:orthogonalBo={b1,b2,b3}:orthogonal basis of W

then

e1,e2,e3:orthonormalBon={e1,e2,e3}:orthonormal basis of W

Formula for vector normalization:

e1=b1∥b1∥, e2=b2∥b2∥, e3=b3∥b3∥

where ∥b1∥, ∥b2∥, ∥b3∥ are the lengths of b1, b2, b3.

Length of a vector is calculated using the following formula:

∥v∥=⟨v,v⟩=v⋅v=∑i=1nvi2

For example, given a vector v:

v=[123]∥v∥=⟨v,v⟩=v⋅v=∑i=1nvi2=12+22+32=14

Example ​

Using previous example, we can calculate the orthonormal basis of v1,v2,v3:

e1=b1∥b1∥=[11−10]12+12+(−1)2+02=[11−10]3=[1313−130]e2=b2∥b2∥=[232343−1]232+232+432+(−1)2=[232343−1]339=[233233433−333]e3=b3∥b3∥=[1012]12+02+12+22=[1012]6=[1601626]

The orthonormal basis of v1,v2,v3 is:

Bon={[1313−130],[222222422−122],[1601626]}

Vector decomposition ​

Given a vector space W and a vector v∈W, we can decompose v into a parallel component v∥ and a perpendicular(orthogonal) component v⊥.

In order to do that we need to know the orthogonal basis Bo of W.

After that we can project v onto each vector in Bo and sum the projections to get v∥.

v∥=∑i=1n⟨v,bi⟩⟨bi,bi⟩⋅bi

where bi is the i-th vector in Bo.

Then we can calculate v⊥:

v⊥=v−v∥

Example ​

Let

W=subspace∈R4

With orthogonal basis:

Bo={[11−10],[232343−1],[1012]}

And arbitrary vector v in W:

v=[4320]

Let's decompose v into a parallel component v∥ and a perpendicular(orthogonal) component v⊥.

v∥=∑i=1n⟨v,bi⟩⟨bi,bi⟩⋅bi=⟨v,b1⟩⟨b1,b1⟩⋅b1+⟨v,b2⟩⟨b2,b2⟩⋅b2+⟨v,b3⟩⟨b3,b3⟩⋅b3⟨v,b1⟩⟨b1,b1⟩⋅b1=4⋅1+3⋅1+2⋅(−1)+0⋅01⋅1+1⋅1+(−1)⋅(−1)+0⋅0⋅[11−10]=53⋅[11−10]=[5353−530]⟨v,b2⟩⟨b2,b2⟩⋅b2=4⋅23+3⋅23+2⋅43+0⋅(−1)23⋅23+23⋅23+43⋅43+(−1)⋅(−1)⋅[232343−1]=2⋅[232343−1]=[434383−2]⟨v,b3⟩⟨b3,b3⟩⋅b3=4⋅1+3⋅0+2⋅1+0⋅21⋅1+0⋅0+1⋅1+2⋅2⋅[1012]=1⋅[1012]=[1012]v∥=[5353−530]+[434383−2]+[1012]=[53+43+153+43+0−53+83+10−2+2]=[12393630]=[4320]v⊥=v−v∥=[4320]−[4320]=[0000]