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

Why does this shortcut for eigenvectors of 2x2 symmetric work?

  1. Apr 19, 2015 #1

    I'k looking at some matlab code specifically eig2image.m at:


    So, I understand how the computations are done with respect to the eigenvector / eigenvalues and using (varitions of ) the quadratic equation etc. But my question is about the computation of the eigenvector using the following code (based on the matlab code) given matrix [a b; b d];

    %% My code, just a scalar version of eig2image.m for understanding eigenvector decomposition

    M = [1,2;2,3];

    function [ L1,L2,v1x,v1y,v2x,v2y ] = SymmetricEig( M )

    % | a b |
    % | |
    % | b d |

    a = M(1,1);
    b = M(1,2);
    d = M(2,2);

    tmp = sqrt((a - d)^2 + 4*b^2);
    v2x = 2*b;
    v2y = d - a + tmp;

    % Normalize
    mag = sqrt(v2x^2 + v2y^2);

    v2x = v2x/mag; %% Why is v2x now the correct eigenvector value?
    v2y = v2y/mag;

    % The eigenvectors are orthogonal
    v1x = -v2y;
    v1y = v2x;

    % Compute the eigenvalues
    mu1 = 0.5*(a + d + tmp);
    mu2 = 0.5*(a + d - tmp);

    % Sort eigen values by absolute value abs(Lambda1)<abs(Lambda2)




    Notice my comment above - Why is v2x now the correct eigenvector value? It was b multiplied by two and then normalized to the magnitude of v2x,v2y; Why does this work? (and it does). It must be a shortcut, factorization, etc. but I don't see it and haven't seen anyplace else that does this.

    I'm just curious.


  2. jcsd
  3. Apr 19, 2015 #2


    User Avatar
    2017 Award

    Staff: Mentor

    b is a real number, so v2x is a real number. A real number cannot be an eigenvector (in a 2D vector space).
    What do you mean with "eigenvector value"?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - does shortcut eigenvectors Date
B Why does a matrix diagonalise in this case? Nov 21, 2017
B Why does every subfield of Complex number have a copy of Q? Jun 11, 2017
I Does this theorem need that Ker{F}=0? May 1, 2017
Shortcut to jacobian Feb 26, 2014