I want to diagonalize a matrix by orthogonalization, but the following method cannot get the correct result:
A = {{1, 2, -3}, {-1, 4, -3}, {1, -2, 5}};
DiagonalizableMatrixQ[A]
Eigensystem[A]
Q = Orthogonalize@(Eigensystem[A][[2]])
Transpose[Q].DiagonalMatrix[{6, 2, 2}].Q == A
Transpose[Q].A.Q == DiagonalMatrix[{6, 2, 2}]
I think it is probably caused by the difference between function Orthogonalize
(Q = Orthogonalize@(Eigensystem[A][[2]])
) and Schmidt orthogonalization.
How can I use built-in functions to do Schmidt orthogonalization and diagonalize the matrix?
Oddly enough, the following code returns an empty set, whereas DiagonalizableMatrixQ[A]==True
indicates that the matrix can be diagonalized:
Q = Array[x, {3, 3}];
A = {{1, 2, -3}, {-1, 4, -3}, {1, -2, 5}};
FindInstance[
Q\[Transpose].A.Q == DiagonalMatrix[{6, 2, 2}] &&
Q\[Transpose].Q == IdentityMatrix[3], Flatten[Q]]
I hope to find the orthogonal matrix Q
by Schmidt orthogonalization and diagonalize the matrix A
.
The definition of Schmidt orthogonalization:
$$\begin{array}{l} \boldsymbol{b}_{1}=\boldsymbol{a}_{1} \\ \boldsymbol{b}_{2}=\boldsymbol{a}_{2}-\frac{\left[\boldsymbol{b}_{1}, \boldsymbol{a}_{2}\right]}{\left[\boldsymbol{b}_{1}, \boldsymbol{b}_{1}\right]} \boldsymbol{b}_{1} \\ \cdots \cdots \cdots \cdots \\ \boldsymbol{b}_{r}=\boldsymbol{a}_{r}-\frac{\left[\boldsymbol{b}_{1}, \boldsymbol{a}_{r}\right]}{\left[\boldsymbol{b}_{1}, \boldsymbol{b}_{1}\right]} \boldsymbol{b}_{1}-\frac{\left[\boldsymbol{b}_{2}, \boldsymbol{a}_{r}\right]}{\left[\boldsymbol{b}_{2}, \boldsymbol{b}_{2}\right]} \boldsymbol{b}_{2}-\cdots-\frac{\left[\boldsymbol{b}_{r-1}, \boldsymbol{a}_{r}\right]}{\left[\boldsymbol{b}_{r-1}, \boldsymbol{b}_{r-1}\right]} \boldsymbol{b}_{r-1}, \end{array}$$
$$\boldsymbol{e}_{1}=\frac{1}{\left\|\boldsymbol{b}_{1}\right\|} \boldsymbol{b}_{1}, \quad \boldsymbol{e}_{2}=\frac{1}{\left\|\boldsymbol{b}_{2}\right\|} \boldsymbol{b}_{2}, \quad \cdots, \quad \boldsymbol{e}_{r}=\frac{1}{\left\|\boldsymbol{b}_{r}\right\|} \boldsymbol{b}_{r}$$
$[x,y]$ is the inner product of vectors x
and y
.
Other examples for testing:
A = {{-2, 1, 1}, {0, 2, 0}, {-4, 1, 3}};
DiagonalizableMatrixQ[A]
Q = (Eigenvectors[A])
Inverse[Q].A.Q
A.Q
I don't know why finding eigenvector matrix does not satisfy $\boldsymbol{A} \boldsymbol{p}_{i}=\lambda_{i} \boldsymbol{p}_{i} \quad(i=1,2, \cdots, n)$ or $Q^{-1} A Q=\Lambda$.
The eigenvector matrix $\boldsymbol{Q}=\left(\boldsymbol{p}_{1}, \boldsymbol{p}_{2}, \boldsymbol{p}_{3}\right)=\left(\begin{array}{ccc} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & -1 & 4 \end{array}\right)$ obtained in the textbook can satisfy $\left(\begin{array}{ccc} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & -1 & 4 \end{array}\right)^{-1} \cdot A \cdot\left(\begin{array}{ccc} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & -1 & 4 \end{array}\right)=\left(\begin{array}{ccc} -1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{array}\right)$.
SchurDecomposition[N[{{1, 2, -3}, {-1, 4, -3}, {1, -2, 5}}]]
tells me that your desire to have orthonormal eigenvectors is not reasonable. $\endgroup$QRDecomposition
. $\endgroup$Orthogonalize
by default generates a Gram[Dash]Schmidt basis. $\endgroup$DiagonalizableMatrixQ[A]==True
indicates thatA
can be diagonalized, butSchurDecomposition[N[{{1, 2, -3}, {-1, 4, -3}, {1, -2, 5}}]]
means thatA
cannot be orthogonal diagonalized. $\endgroup$