Orthogonal Diagonalization

Example 3.  (Eigenvalues & Eigenvectors Example 5.)

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

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

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

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

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

``

`Is A also orthogonally diagonalizable ?`

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

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

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

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

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

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

`Obtain a basis of three orthogonal vectors: `

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

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

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

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

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

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

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

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

`Use these orthonormal column vectors to construct Q:`

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

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

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

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