MHB Matrix Sum of Squares: Rotate Coord System to Express as Diagonal

ognik
Messages
626
Reaction score
2
Maybe I just need help understanding the question ...

write $ x^2 + 2xy + 2yz + z^2 $ as a sum of squares $ (x')^2 -2(y')^2 + 2(z')^2 $ in a rotated coord system.

The 1st expression $ = \left[ x, y, z \right]M \begin{bmatrix}x\\y\\z\end{bmatrix} $ and I get $ M = \begin{bmatrix}1&1&0\\1&0&1\\0&1&1\end{bmatrix}$
(I wonder if a matrix with 'anti-trace' = 0 has any significant usage somewhere?)

So then would I go 2nd expression (which I see is diagonal) $ = SMS^{-1} $ and somehow find $S$ from that?
 
Last edited by a moderator:
Physics news on Phys.org
Hi ognik,

The expression in terms of $x',y',z'$ is not a sum of squares: the coefficient of $(y')^2$ has a minus sign.

You can write

$$x^2+2xy+2yz+z^2=(x^2+2xy+y^2)-y^2+2yz+z^2=(x+y)^2-(y^2-2yz+z^2)+2z^2=(x+y)^2-(y-z)^2+2z^2.$$

From here, you can see that setting $x'=x+y$, $y'=\frac{y}{\sqrt{2}}-\frac{z}{\sqrt{2}}$, and $z'=z$ will make the quadratic form $x^2+2xy+2yz+z^2$ into $(x')^2-2(y')^2+2(z')^2$.
 
Euge's method is perfect for finding a change of basis that satisfies the criteria.

However, the problem asks for a 'rotated coord system'.
To find it, we need to diagonalize the matrix $M$, that is, write it as $M = BDB^T$, where $D$ is a diagonal matrix and $B$ is an orthogonal matrix.
Diagonalization is typically done by finding the eigenvalues and their corresponding eigenvectors.
It is guaranteed that $M$ is diagonalizable and also that the eigenvectors are orthogonal (spectral theorem for symmetric real matrices).
$D$ is the matrix with the eigenvalues on its diagonal, while $B$ is the matrix with the corresponding eigenvectors, normalized to unit length, and such that $\det B=1$ to ensure it's a rotation without a reflection.

When we have it, we can substitute:
$$x^T M x = x^T BDB^T x = (B^T x)^T D (B^T x) = x'^T D x'$$
 
Wow, how did I miss that it had to be a rotated coordinate system. :confused: I Like Serena is on point about the analysis of finding the equivalent quadratic form in the rotated coord. system. However, the resulting form will not be $(x')^2 - 2(y')^2 + 2(z')^2$, but $(x')^2 - (y')^2 + 2(z')^2$. The reason is that the set of eigenvalues of $M$ is $\{1,-1,2\}$, not $\{1,-2,2\}$.The vectors

$$\begin{bmatrix}-\frac{1}{\sqrt{2}}\\0\\ \frac{1}{\sqrt{2}}\end{bmatrix},\begin{bmatrix}\frac{1}{\sqrt{6}}\\ -\frac{2}{\sqrt{6}}\\ \frac{1}{\sqrt{6}}\end{bmatrix}, \begin{bmatrix}\frac{1}{\sqrt{3}}\\ \frac{1}{\sqrt{3}}\\ \frac{1}{\sqrt{3}}\end{bmatrix}$$

form an orthonormal basis of eigenvectors for $M$, with the eigenvectors corresponding to eigenvalues $1$, $-1$, and $2$, respectively. So setting

$$B = \begin{bmatrix}-\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}}\\ 0 & -\frac{2}{\sqrt{6}} & \frac{1}{\sqrt{3}}\\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}}\end{bmatrix}$$

we have

$$B^TMB = \begin{bmatrix}1 & 0 & 0\\0 & -1 & 0\\0 & 0 & 2\end{bmatrix}.$$

For the new coordinate system $(x',y',z')$, we have

$$\begin{bmatrix}x'\\y' \\z' \end{bmatrix} = B^T\begin{bmatrix} x\\ y\\ z\end{bmatrix} = \begin{bmatrix} -\frac{1}{\sqrt{2}}x + \frac{1}{\sqrt{2}}z\\ \frac{1}{\sqrt{6}}x - \frac{2}{\sqrt{6}}y + \frac{1}{\sqrt{6}}z\\ \frac{1}{\sqrt{3}}x + \frac{1}{\sqrt{3}}y + \frac{1}{\sqrt{3}}z\end{bmatrix}$$

and quadratic form

$$\begin{bmatrix} x' & y' & z'\end{bmatrix}\begin{bmatrix}1 & 0 & 0\\0 & -1 & 0\\0 & 0 & 2\end{bmatrix}\begin{bmatrix}x'\\y'\\z'\end{bmatrix} = (x')^2 - (y')^2 + 2(z')^2.$$
 
Euge said:
$$B = \begin{bmatrix}\frac{-1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{6}} & -\frac{2}{\sqrt{6}} & \frac{1}{\sqrt{6}}\\ \frac{1}{\sqrt{3}} & \frac{1}{\sqrt{3}} & \frac{1}{\sqrt{3}}\end{bmatrix}$$

Wolfram says that $\det B = 0$. :eek:

I think the top right entry should be positive.

In the final expression the signs are different (top left made positive), but then the determinant is $-1$.
 
I made a typo which should be fixed now. :)

Edit: Ok, my $B$ was interchanged with $B^T$. I've made the corrections.
 
I like Serena said:
When we have it, we can substitute:
$$x^T M x = x^T BDB^T x = (B^T x)^T D (B^T x) = x'^T D x'$$
Thanks folks, I follow down to here, and it fits with what I am looking at in the book. Just taking a checkpoint:

We can't be talking about the eigenvalues of 'my' M here, so for the secular eqtn of D I get $ Det\begin{bmatrix}1-\lambda&0&0\\0&-2-\lambda&0\\0&0&2-\lambda\end{bmatrix} = 0$, which gives me eigenvalues of 1, -2, 2?
 
Hi ognik,

I don't understand what you did there, and why you think none of us were speaking of the same $M$ as yours. With

$$M = \begin{bmatrix}1 & 1 & 0\\1 & 0 & 1\\0 & 1 & 1\end{bmatrix}$$

we have

$$M - \lambda I = \begin{bmatrix}1 & 1 & 0\\1 & 0 & 1\\0 & 1 & 1\end{bmatrix} - \begin{bmatrix} \lambda & 0 & 0\\0 & \lambda & 0\\0 & 0 & \lambda\end{bmatrix} = \begin{bmatrix}1 - \lambda & 1 & 0\\1 & -\lambda & 1\\ 0 & 1 & 1 - \lambda\end{bmatrix}$$

The characteristic equation for $M$ is therefore

$$\operatorname{det}\begin{bmatrix}1 - \lambda & 1 & 0\\1 & -\lambda & 1\\ 0 & 1 & 1 - \lambda\end{bmatrix} = 0$$

Expanding the determinant along the first column, the right-hand side of the equation becomes

$$(1-\lambda) \operatorname{det}\begin{bmatrix}-\lambda & 1\\ 1 & 1 - \lambda\end{bmatrix} - \operatorname{det}\begin{bmatrix}1 & 0\\1 & 1 -\lambda\end{bmatrix} = (1 -\lambda)[(-\lambda)(1-\lambda) - 1] - (1 - \lambda) = (1 - \lambda)(\lambda^2 - \lambda - 1) - (1 - \lambda) = (1 - \lambda)(\lambda^2 - \lambda - 2) = (1 - \lambda)(1 + \lambda)(2 - \lambda).$$

Thus $(1 - \lambda)(1 + \lambda)(2 - \lambda) = 0$, yielding solutions $\lambda_1 = 1$, $\lambda_2 = -1$, and $\lambda_3 = 2$. The numbers $\lambda_1,\lambda_2,\lambda_3$ are the eigenvalues of $M$.
 
I must have made a mistake with my calcs then and will check them, got different eigenvalues from M.

I instead looked at $ x'^TDx' $ which I figured should be equal to $x^2 -2(y^2) +2z^2 $, so found the eigenvalues of $D= \begin{bmatrix}1&0&0\\0&-2&0\\0&0&2\end{bmatrix}$ (When in doubt, try something else...) I think I would have to be finding $B^{-1}$ if I continued? - more difficult.

OK, the rest is falling into place for me, the rotation matrix mentioned is then B? (Got to mention the book covers this whole lot in a page or so, so if there is a noddy guide link somewhere, I'd appreciate it)
 
  • #10
Euge said:
The reason is that the set of eigenvalues of $M$ is $\{1,-1,2\}$,

The vectors

$$\begin{bmatrix}-\frac{1}{\sqrt{2}}\\0\\ \frac{1}{\sqrt{2}}\end{bmatrix},\begin{bmatrix}\frac{1}{\sqrt{6}}\\ -\frac{2}{\sqrt{6}}\\ \frac{1}{\sqrt{6}}\end{bmatrix}, \begin{bmatrix}\frac{1}{\sqrt{3}}\\ \frac{1}{\sqrt{3}}\\ \frac{1}{\sqrt{3}}\end{bmatrix}$$

form an orthonormal basis of eigenvectors for $M$,
Hi guys, just revisiting this and want to confirm it doesn't matter about the order we take some things.

A) For example, please confirm I can take the order of the eigenvalues as of $M$ to be $\{-1,1,2\}$ ?

B) Can I additionally change the order of elements in the eigenvectors, for example for $\lambda = 1$ I could choose z = -1, making x=1 and the (now 2nd) eigenvector would then be $\begin{bmatrix}\frac{1}{\sqrt{2}}\\0\\ -\frac{1}{\sqrt{2}}\end{bmatrix} $ ?

C) I have noticed that I don't have to completely row-reduce some matrices in order to find the eigenvalue - is there a rule of thumb/approach about this? For example it might be that once each row has at least one zero, the eigenvalue can be found without further row reductions?

D) Finally, once I have the eigenvalues, I could find D by inspection of the sum of squares?
In fact it seems I could find D by inspection straight off, or is that just coincidence with this exercise?
 
Last edited:

Similar threads

Replies
1
Views
3K
Replies
10
Views
2K
Replies
7
Views
2K
Replies
12
Views
2K
Replies
2
Views
1K
Back
Top