Orthogonal Diagonalization

Example 2.  (Eigenvalues & Eigenvectors Example 4.)

`A is diagonalizable using the eigenvectors of `*A*` to construct P:`

v[1] = matrix([[1], [0], [1]]), v[2] = matrix([[1], [2], [0]]), v[3] = matrix([[1], [1], [1]])

P = matrix([[1, 1, 1], [0, 2, 1], [1, 0, 1]]), P^`-1` = matrix([[2, -1, -1], [1, 0, -1], [-2, 1, 2]])

P^`-1`*P*` = `*matrix([[2, -1, -1], [1, 0, -1], [-2, 1, 2]])*matrix([[1, 1, 1], [0, 2, 1], [1, 0, 1]]) = matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

P^`-1`*A*P*` = `*matrix([[2, -1, -1], [1, 0, -1], [-2, 1, 2]])*matrix([[-2, 2, 3], [-2, 3, 2], [-4, 2, 5]])*matrix([[1, 1, 1], [0, 2, 1], [1, 0, 1]]) = matrix([[1, 0, 0], [0, 2, 0], [0, 0, 3]])

``

`Is A also orthogonally diagonalizable ?`

`Begin with the three eigenvectors of A and convert to an orthonormal set: `

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

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

v[3] = vector([1, 1, 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] = vector([1, 0, 1])

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

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

`Obtain a basis of three orthogonal vectors: `

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

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

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

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

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

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

u[3] = 1/` ||`/w[3]/`||`*` w`[3], `   ||`*w[3]*`||` = 1/3

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

`Use these orthonormal column vectors to construct Q:`

Q = matrix([[1/2*2^(1/2), 1/6*2^(1/2), -2/3], [0, 2/3*2^(1/2), 1/3], [1/2*2^(1/2), -1/6*2^(1/2), 2/3]]), Q^`-1` = matrix([[1/2*2^(1/2), 0, 1/2*2^(1/2)], [1/6*2^(1/2), 2/3*2^(1/2), -1/6*2^(1/2)], [-2/3,...

Q^`-1`*Q*` = `*matrix([[1/2*2^(1/2), 0, 1/2*2^(1/2)], [1/6*2^(1/2), 2/3*2^(1/2), -1/6*2^(1/2)], [-2/3, 1/3, 2/3]])*matrix([[1/2*2^(1/2), 1/6*2^(1/2), -2/3], [0, 2/3*2^(1/2), 1/3], [1/2*2^(1/2), -1/6*2^...

Q^`-1`*A*Q*` = `*matrix([[1/2*2^(1/2), 0, 1/2*2^(1/2)], [1/6*2^(1/2), 2/3*2^(1/2), -1/6*2^(1/2)], [-2/3, 1/3, 2/3]])*matrix([[-2, 2, 3], [-2, 3, 2], [-4, 2, 5]])*matrix([[1/2*2^(1/2), 1/6*2^(1/2), -2/3...

`Note that A is not orthogonally diagonalizable using Q, which is what we expect since A is not symmetric.`