Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Linear algebra Applications of Diagonalization

  1. Jul 27, 2010 #1
    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:

  2. jcsd
  3. Jul 27, 2010 #2
    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
  4. Jul 28, 2010 #3
    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
     
  5. Jul 28, 2010 #4
    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
     
  6. Jul 28, 2010 #5
    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:
    [tex]\lambda[/tex]_1 = [tex]\lambda[/tex]_ 2 = 4
    [0;1;0;0], [2;0;0;1]

    [tex]\lambda[/tex]_3 = [tex]\lambda[/tex]_ 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?
     
  7. Jul 28, 2010 #6
    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.
     
  8. Jul 28, 2010 #7
    oh, that check is very helpful. Thank you for taking the time to explain in so much detail. It actually makes sense now
     
  9. Jul 28, 2010 #8
    Yqw. You can return the favor by abusing your academic instructor. And this is not very detailed.
     
  10. Jul 28, 2010 #9
    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.
     
  11. Jul 30, 2010 #10
    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:

    [tex]\frac{dy}{dt}[/tex] = [tex]PDP^{-1}[/tex]Y <=> [tex]\frac{d}{dt}P^{-1}[/tex] = [tex]P^{-1}PDP^{-1}Y = DP^{-1}Y P^{-1}Y = Z [/tex]

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

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

    [tex]Z = P^{-1}Y <=> Y = PZ[/tex]

    I need to find D, which is done, and [tex]P^{-1}[/tex] to find Z

    I'm not sure where to go with this new information.
     
  12. Jul 31, 2010 #11

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Suppose you have the system

    [tex]\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}[/tex]

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

    [tex]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}[/tex]

    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:

    [tex]\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}[/tex]

    [tex]\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}[/tex]

    You also know that

    [tex]\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}[/tex]

    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.
     
  13. Jul 31, 2010 #12
    I tried the method with [tex]A_{3}[/tex]

    [tex]\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}[/tex]

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

    [tex]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}[/tex]

    [tex]\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}[/tex]

    [tex]\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}[/tex]

    also know that

    [tex]\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}[/tex]

    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
     
  14. Jul 31, 2010 #13

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    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 [tex]\widetilde{Y}[/tex] which decouples the differential equations, in terms of the functions yi.

    You know that

    [tex]\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}[/tex]

    This is the equation [itex]dZ/dt = DZ[/itex]. 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.
     
  15. Jul 31, 2010 #14
    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
    [tex]\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}[/tex]

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

    [tex]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}[/tex]

    [tex]\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}[/tex]

    [tex]\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}[/tex]


    So, is that Z matrix the one I would need? for [tex]\widetilde{Y}[/tex]? ( In my new explination that I posted I put Z for [tex]\widetilde{Y}[/tex], sorry I forgot to mention it)
     
  16. Jul 31, 2010 #15

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Yes, your instructor used the letter Z for what the problem called [tex]\widetilde{Y}[/tex], probably to avoid confusion with the other y's.
     
  17. Jul 31, 2010 #16
    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
     
  18. Jul 31, 2010 #17

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    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.
     
  19. Jul 31, 2010 #18
    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 [tex]\frac{dY_{4}}{dt}[/tex] =[tex] A_{4}[/tex][tex]Y_{4}[/tex]
     
  20. Aug 1, 2010 #19
    also is there a way I can check it and get my original matrix? So I can ake sure i'm doing ir right
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook