Isn't the second question a complete retrogression?
A third-order orthogonal matrix q is needed, which requires
(1) The three column vectors in this matrix are orthogonal,
(2) and each is a unit vector.
So the first step is to make these three column vectors orthogonal,
Because the eigenvectors of real symmetric matrices with different eigenvalues in the first problem must be orthogonal,
At this time, only two eigenvectors belonging to the same eigenvalue (λ=0) need to be orthogonalized.
Using Schmidt orthogonalization method, 1 eigenvectors of two orthogonal column vectors plus another eigenvalue (λ=3) are obtained.
We get three orthogonal column vectors.
The second step is to unitize these three orthogonal column vectors, that is, divide them by their respective lengths (sum of squares of three elements).
The last step is to write these three orthogonal and unitized column vectors together from left to right to form a 3*3 matrix.
This is Q.
It should be noted that the arrangement order of the three column vectors from left to right corresponds to the arrangement order of the three eigenvalues in the diagonal matrix on the right side of the equation from left to right.