Gram-Schmidt Process & Orthonormal Bases

Example 1.

`Begin with three linearly independent vectors: `

v[1] = vector([1, 1, 1])

v[2] = vector([0, 1, 1])

v[3] = vector([0, 0, 1])

`Apply Gram-Schmidt Process to these three vectors: `

w[1] = v[1]

w[2] = v[2]-`(`*v[2]*` dot`*` w`[1]*`)`/` ||`/w[1]/`||`^2*`w `[1]

w[3] = v[3]-`(`*v[3]*` dot`*` w`[1]*`)`/` ||`/w[1]/`||`^2*`w `[1]-`(`*v[3]*` dot`*` w`[2]*`)`/` ||`/w[2]/`||`^2*`w `[2]

w[1] = [1, 1, 1]

w[2] = vector([0, 1, 1])-`(`*vector([0, 1, 1])*` dot`*vector([1, 1, 1])*`)`/` ||`/vector([1, 1, 1])/`||`^2*vector([1, 1, 1])

w[3] = vector([0, 0, 1])-`(`*vector([0, 0, 1])*` dot`*vector([1, 1, 1])*`)`/` ||`/vector([1, 1, 1])/`||`^2*vector([1, 1, 1])-`(`*vector([0, 0, 1])*` dot`*vector([-2/3, 1/3, 1/3])*`)`/` ||`/vector([-2/3...

`Obtain a basis of three orthogonal vectors: `

w[1] = vector([1, 1, 1])

w[2] = vector([-2/3, 1/3, 1/3])

w[3] = vector([0, -1/2, 1/2])

`Obtain an orthonormal basis of three orthogonal unit vectors: `

u[1] = 1/` ||`/w[1]/`||`*` w`[1], `   ||`*w[1]*`||` = 3^(1/2)

u[2] = 1/` ||`/w[2]/`||`*` w`[2], `   ||`*w[2]*`||` = 1/3*6^(1/2)

u[3] = 1/` ||`/w[3]/`||`*` w`[3], `   ||`*w[3]*`||` = 1/2*2^(1/2)

u[1] = vector([1/3*3^(1/2), 1/3*3^(1/2), 1/3*3^(1/2)])

u[2] = vector([-1/3*6^(1/2), 1/6*6^(1/2), 1/6*6^(1/2)])

u[3] = vector([0, -1/2*2^(1/2), 1/2*2^(1/2)])