# Homework Help: Linear algebra Applications of Diagonalization

1. Jul 27, 2010

### SpiffyEh

1. The problem statement, all variables and given/known data

I attached the problem as an image, its easier to see this way.

2. Relevant equations

3. The attempt at a solution
I understand how to find diagonal matricies using eigenvalues but I'm lost on the Y part. How do I find the vector Y?

#### Attached Files:

• ###### problem.png
File size:
14.9 KB
Views:
179
2. Jul 27, 2010

### sshzp4

Given dY=AY. Object is to find eigenvectors and eigenvalues. An eigenvector of A, Y is defined by the idea that the direction of Y is invariant under transformation by A; Or A maps Y onto itself eg, AY=p Y, where l is the eigenvalue and I is identity matrix and p is a scalar. So, solve for the roots of the characteristic equation that you will find from det(A-pI)=0. The roots of the polynomial in p are the eigenvalues, and will go into the diagonal positions on the L matrix (where L is your diagonalized matrix).

To get your first eigenvector, choose any of the eigenvalues p, write down the homogeneous equation (A-pI)Y=0 using only ONE value of p. Solve the linear system of equations described by the row space vectors by assuming one unknown variable to be parametric value. The rest of the values will be in terms of this parametric value and the column space described by the vector formed from these values will be the first eigen vector. Repeat for the remain eigen values.

Eg. Let p1, p2 be eigen values of [a b; c d]; Then your first eigen vector is found by solving the equations (a-p1)x + b y=0; and cx+ (d-p1)y =0; Assume x=k=constant. So this gives, y=-(a-p1)*k/b. So one eigen vector is: [k; -(a-p1)*k/b].

You could then normalize the eigenvectors if you like.

Stop thinking of the process of determining eigenvalues solely as a diagonalization (no matter what your instructor says). I understand this is a linear systems class and you probably have dealt with state space representations already. Try to compare the solutions of second order system ODE's (you remember the ones with some c1 exp(i c2x)+c3exp(-i c4 x) type solutions?) and draw significance between the eigenvalues you just obtained and the values of c2 and c4. Look in linear algebra texts about how vector spaces work. This stuff is extremely interesting, trivial but extremely powerful.

Last edited: Jul 27, 2010
3. Jul 28, 2010

### SpiffyEh

i understand how to obtain the eigenvalues and eigenvectors. Is the decoupled system just the eigenvector matrix and the diagonal matrix with eigenvalues? If not could you please show me one of them step by step so I can understand. Sorry, I really learn better by example, I have a hard time without it

4. Jul 28, 2010

### sshzp4

Try to guess what the term 'decoupled' could imply. It means a system not coupled together. So that raises the question, what a coupled system. Lets look at the original equations, dY=AY. How did you get that? Well you had a system that looked like

dy1= a1 y1 + a2 y2 +a3y3...
dy2= b1 y1 + b2 y2 +b3y3...
dy3= c1 y1 + c2 y2 +c3y3...

Your dY matrix is [dy1; dy2; dy3..]; and your A matrix is the coefficient matrix, finally your Y matrix is [y1; y2; y3...]. So what's so coupled in this system? The coupled part is that you have expressions containing y2 and y3.. in an equation for dy1. When you want to decouple a coupled system, what you need is to express dy1 in terms of y1 alone.

So now you should see where this diagonalization helped you. It gave you a new version of the A matrix called the L matrix (diagonals), which if you re-express as a series of equations gives,

dy1= p1 y1
dy2= p2 y2
dy3= p3 y3

And you should now see how the system has become decoupled. So what's great about this, you might wonder. Well this decoupling process allowed you to write your system as a simple ODEs that are easy to solve using tradition integration or numerical integration.

EOT

Sid

5. Jul 28, 2010

### SpiffyEh

Ok, I think i understand. I tried to do A_3, since its triangular the eigenvalues are 4,4,2,2
The eigenvectors I got were:
$$\lambda$$_1 = $$\lambda$$_ 2 = 4
[0;1;0;0], [2;0;0;1]

$$\lambda$$_3 = $$\lambda$$_ 4 = 2
[0;0;1;0], [0;0;0;1]
* all of the eigenvectors are 4x1 matricies

So,
D =
[4 0 0 0
0 4 0 0
0 0 2 0
0 0 0 2]

and Y =
[0 2 0 0
1 0 0 0
0 0 1 0
0 1 0 1]

is this correct?

6. Jul 28, 2010

### sshzp4

Take a column of D, lets call it g1. And then we find out what A_3*g is. If A_3*g=lambda1*g, then your answer is correct.

In other words, yes.

7. Jul 28, 2010

### SpiffyEh

oh, that check is very helpful. Thank you for taking the time to explain in so much detail. It actually makes sense now

8. Jul 28, 2010

### sshzp4

Yqw. You can return the favor by abusing your academic instructor. And this is not very detailed.

9. Jul 28, 2010

### SpiffyEh

Yeah, I know I should get help from him but his office hours are during a time when I have another class and I really can't miss it and on top of that he doesn't have any other time so its hard.

10. Jul 30, 2010

### SpiffyEh

my professor actually mentioned how he expects this to be done in class today and I don't think its the same as what was done here. I'm confused about what he said. This is the logic he went through:

$$\frac{dy}{dt}$$ = $$PDP^{-1}$$Y <=> $$\frac{d}{dt}P^{-1}$$ = $$P^{-1}PDP^{-1}Y = DP^{-1}Y P^{-1}Y = Z$$

$$\frac{dZ}{dt} = DZ <=> \frac{d}{dt}[Z_{1} ... Z_{n}]$$
(where this is a nx1 matrix) = matrix with eigenvalues on the diagonal, and 0 everywhere else
* $$[Z_{1} ... Z_{n}]$$

$$\frac{d}{dt}Z_{i} = \lambda_{i}Z_{i}, i = 1,2,3,...,n => Z_{i}(t) = Kie^{\lambda it}$$

$$Z = P^{-1}Y <=> Y = PZ$$

I need to find D, which is done, and $$P^{-1}$$ to find Z

I'm not sure where to go with this new information.

11. Jul 31, 2010

### vela

Staff Emeritus
Suppose you have the system

$$\frac{d}{dt}\begin{bmatrix}y_1 \\ y_2\end{bmatrix} = \begin{bmatrix}0 & 1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix}y_1 \\ y_2\end{bmatrix}$$

You'd find the eigenvalues of the matrix are $\lambda_1 = 1$ and $\lambda_2 = -1$, with corresponding eigenvectors $\vec{v}_1 = (1,1)$ and $\vec{v}_2 = (-1,1)$. This gives you the matrices

$$P = \begin{bmatrix}1 & -1 \\ 1 & 1\end{bmatrix}\hspace{0.5in}P^{-1} = \frac{1}{2}\begin{bmatrix}1 & 1 \\ -1 & 1\end{bmatrix}\hspace{0.5in}{D = \begin{bmatrix}1 & 0 \\ 0 & -1\end{bmatrix}$$

where the columns of P are the eigenvectors. The matrices P and P-1 merely tell you how to combine y1 and y2 to get z1 and z2 and vice versa:

$$\begin{bmatrix}z_1 \\ z_2\end{bmatrix} = P^{-1}\begin{bmatrix}y_1 \\ y_2\end{bmatrix} = \frac{1}{2}\begin{bmatrix}1 & 1 \\ -1 & 1\end{bmatrix}\begin{bmatrix}y_1 \\ y_2\end{bmatrix} = \begin{bmatrix}(y_1+y_2)/2 \\ (-y_1+y_2)/2\end{bmatrix}$$

$$\begin{bmatrix}y_1 \\ y_2\end{bmatrix} = P\begin{bmatrix}z_1 \\ z_2\end{bmatrix} = \begin{bmatrix}1 & -1 \\ 1 & 1\end{bmatrix}\begin{bmatrix}z_1 \\ z_2\end{bmatrix} = \begin{bmatrix}z_1-z_2 \\ z_1+z_2\end{bmatrix}$$

You also know that

$$\frac{d}{dt}\begin{bmatrix}z_1 \\ z_2\end{bmatrix} = \begin{bmatrix}1 & 0 \\ 0 & -1 \end{bmatrix}\begin{bmatrix}z_1 \\ z_2\end{bmatrix}$$

which has the solutions

z1(t) = K1et
z2(t) = K2e-t.

Therefore,

y1 = z1 - z2 = K1et - K2e-t
y2 = z1 + z2 = K1et + K2e-t.

As a check, you can differentiate y1 and y2 to get

y1' = K1et + K2e-t = y2
y2' = K1et - K2e-t = y1

So you can see they satisfy the original differential equation system.

12. Jul 31, 2010

### SpiffyEh

I tried the method with $$A_{3}$$

$$\frac{d}{dt}\begin{bmatrix}y_1 \\ y_2\\y_3\\y_4\end{bmatrix} = \begin{bmatrix}4 & 0 & 0 & 0 \\ 0 & 4 & 0 & 0 \\ 0 & 0 & 2 & 0\\ 1 & 0 & 0 & 2 \end{bmatrix}\begin{bmatrix}y_1 \\ y_2\\y_3\\y_4\end{bmatrix}$$

eigenvalues of the matrix are $\lambda_1 = \lambda_2 = 4$ and $\lambda_3 = \lambda_4 = 2$, with corresponding eigenvectors $\vec{v}_1 = (0,1,0,0)$, $\vec{v}_2 = (2,0,0,1)$, $\vec{v}_3 = (0,0,1,0)$, and v_4 = (0,0,0,1). This gives the matrices

$$P = \begin{bmatrix} 0 & 2 & 0 & 0 \\ 1 & 0 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 \end{bmatrix}\hspace{0.5in}P^{-1} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ \frac{1}{2} & 0 & 0 & 0\\ 0 & 0 & 1 & 0\\ -\frac{1}{2} & 0 & 0 & 1 \end{bmatrix}\hspace{0.5in}{D = \begin{bmatrix} 4 & 0 & 0 & 0 \\ 0 & 4 & 0 & 0\\ 0 & 0 & 2 & 0\\ 0 & 0 & 0 & 2 \end{bmatrix}$$

$$\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix} = P^{-1}\begin{bmatrix} y_1 \\ y_2 \\y_3 \\y_4 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ \frac{1}{2} & 0 & 0 & 0\\ 0 & 0 & 1 & 0\\ -\frac{1}{2} & 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} y_1 \\ y_2 \\ y_3 \\ y_4 \end{bmatrix} = \begin{bmatrix} y_1 \\ y_2/2 \\ y_3 \\ -\frac{1}{2}y_1 + y_4 \end{bmatrix}$$

$$\begin{bmatrix} y_1 \\ y_2 \\ y_3 \\ y_4 \end{bmatrix} = P\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix} = \begin{bmatrix} 0 & 2 & 0 & 0 \\ 1 & 0 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 \end{bmatrix}\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix} = \begin{bmatrix} 2z_1 \\ z_2 \\ z_3 \\ z_2 + z_4 \end{bmatrix}$$

also know that

$$\frac{d}{dt}\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix} = \begin{bmatrix} 4 & 0 & 0 & 0 \\ 0 & 4 & 0 & 0\\ 0 & 0 & 2 & 0\\ 0 & 0 & 0 & 2 \end{bmatrix}\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix}$$

which has the solutions

z1(t) = K1e4t
z2(t) = K2e4t
z3(t) = K3e2t
z4(t) = K4e2t.

Therefore,

y1 = 2z1 = 2K1e4t
y2 = z2 = K2e4t
y3 = z3 = K3e2t
y4 = z2 + z4 = K2e4t + K4e2t

Have I done this correctly so far? So the Z that I'm supposed to find would be the equations? I guess i'm not seeing how it splits up into D and Z

13. Jul 31, 2010

### vela

Staff Emeritus
Yes, what you have looks good, but you've actually done more than the problem asked for. I don't think the problem is asking you to solve the actual system; it only want you to find the matrix D and the vector $$\widetilde{Y}$$ which decouples the differential equations, in terms of the functions yi.

You know that

$$\frac{d}{dt}\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix} = \begin{bmatrix} 4 & 0 & 0 & 0 \\ 0 & 4 & 0 & 0\\ 0 & 0 & 2 & 0\\ 0 & 0 & 0 & 2 \end{bmatrix}\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix}$$

This is the equation $dZ/dt = DZ$. Because the matrix is diagonal, the differential equations the zi's satisfy are decoupled, so Z is the vector you were looking for. You expressed it in terms of the yi's a few lines earlier.

14. Jul 31, 2010

### SpiffyEh

hmm maybe that was a bad example to try it on, but with that one, what happens to the 1 that was in position 4,1 in the original matrix?

I'll try it with a_4
$$\frac{d}{dt}\begin{bmatrix}y_1 \\ y_2\end{bmatrix} = \begin{bmatrix}.1 & .6 \\ .9 & .4 \end{bmatrix}\begin{bmatrix}y_1 \\ y_2\end{bmatrix}$$

$\lambda_1 = 1$ and $\lambda_2 = -.5$, with corresponding eigenvectors $\vec{v}_1 = (2,3)$ and $\vec{v}_2 = (-1,1)$

$$P = \begin{bmatrix}2 & -1 \\ 3 & 1\end{bmatrix}\hspace{0.5in}P^{-1} = \frac{1}{5}\begin{bmatrix}1 & 1 \\ -3 & 2\end{bmatrix}\hspace{0.5in}{D = \begin{bmatrix}1 & 0 \\ 0 & -.5\end{bmatrix}$$

$$\begin{bmatrix}z_1 \\ z_2\end{bmatrix} = P^{-1}\begin{bmatrix}y_1 \\ y_2\end{bmatrix} = \frac{1}{5}\begin{bmatrix}1 & 1 \\ -3 & 2\end{bmatrix}\begin{bmatrix}y_1 \\ y_2\end{bmatrix} = \begin{bmatrix}(y_1+y_2)/5 \\ (-3y_1+2y_2)/5\end{bmatrix}$$

$$\begin{bmatrix}y_1 \\ y_2\end{bmatrix} = P\begin{bmatrix}z_1 \\ z_2\end{bmatrix} = \begin{bmatrix}2 & -1 \\ 3 & 1\end{bmatrix}\begin{bmatrix}z_1 \\ z_2\end{bmatrix} = \begin{bmatrix}2z_1-z_2 \\ 3z_1+z_2\end{bmatrix}$$

So, is that Z matrix the one I would need? for $$\widetilde{Y}$$? ( In my new explination that I posted I put Z for $$\widetilde{Y}$$, sorry I forgot to mention it)

15. Jul 31, 2010

### vela

Staff Emeritus
Yes, your instructor used the letter Z for what the problem called $$\widetilde{Y}$$, probably to avoid confusion with the other y's.

16. Jul 31, 2010

### SpiffyEh

what happens to the 1 that was in position 4,1 in the original matrix for the A_3?
Is the decomposition really just DZ? If I multiply it I don't get the original matrix like I would with a PDP^(-1) decomposition

17. Jul 31, 2010

### vela

Staff Emeritus
The matrix A tells you how the yi's and their derivatives are related. The zi's are linear combinations of the yi's, so the zi's and their derivatives are related in a different way, namely by the matrix D. The equations Y'=AY and Z'=DZ describe the same system but just in two different ways.

The reason for using the Z description is that Z'=DZ is very easy to solve. You can do it by inspection whereas solving Y'=AY directly takes quite a bit of work. The difference in difficulty is precisely because A has off-diagonal elements whereas D is a diagonal matrix. So the idea here is to figure out how to turn Y'=AY into Z'=DZ. Once you do that, it's easy to solve the Z system and then translate that solution back to find Y.

So say you have Y'=AY. You find the eigenvalues and eigenvectors and construct P and then find P-1. So you make an educated guess and say let Z=P-1Y, and hope things work out well. We can ask, what differential equation does Z satisfy? If we differentiate Z, we get

Z' = (P-1Y)' = P-1Y' = P-1AY

Since PP-1=I, we can insert that combination between the A and Y to get

Z' = P-1A(PP-1)Y = (P-1AP)(P-1Y) = DZ

where D=P-1AP, which is the diagonal matrix consisting of the eigenvalues. This exactly what we were looking for.

18. Jul 31, 2010

### SpiffyEh

in post #14, I did the process for A_4. How would I write the DZ? Just the matricies. Could you please show me, I want to make sure I'm understanding you correctly. In the form $$\frac{dY_{4}}{dt}$$ =$$A_{4}$$$$Y_{4}$$

19. Aug 1, 2010

### SpiffyEh

also is there a way I can check it and get my original matrix? So I can ake sure i'm doing ir right