[SciPy-user] eigenvector values (negative where it should be positive)

Robert Kern robert.kern@gmail....
Sun May 24 21:40:48 CDT 2009


2009/5/24 Carlos "Guâno" Grohmann <carlos.grohmann@gmail.com>:
> Hello all
>
> I'm working on some structural geology data, using numpy (I'm
> following some class notes, so I can check my results). I have a set
> of directional data (azimuth/dip):
>
> 12 42
> 18 40
> 22 48
> 15 30
> 10 42
> 20 30
>
> First I read the data and create a matrix with the direction cosines like this:
>
> #direction cosines relative to axis oriented north, east and down
> # phi = longitude = azimuth (dip direction)
> # theta = latitude = dip
> # xi = cos(theta[i])*cos(phi[i])
> # yi = cos(theta[i])*sin(phi[i])
> # zi = sin(theta[i])
> # Tmat = orientation matrix T
> # Tmat = sum(xi2)    sum(xi.yi)    sum(xi.zi)
> #        sum(yi.xi)  sum(yi2)      sum(yi.zi)
> #        sum(zi.xi)  sum(zi.yi)    sum(zi2)
>
> This is the matrix:
>
> [[ 3.34172131  0.96327612  2.73061427]
>  [ 0.96327612  0.29736701  0.78834422]
>  [ 2.73061427  0.78834422  2.36091168]]
>
>
> So far so good, but according to my example, the eigenvectors should look like:
>
>  Vector 1 Vector 2 Vector 3
> X  0.749    -0.590   -0.300
> Y  0.217    -0.210    0.953
> Z  0.626    0.779     0.029
>
> and I have this:
>
> [[-0.74913585 -0.59037777  0.30041565]
>  [-0.21679731 -0.21002264 -0.95335692]
>  [-0.62593482  0.77932315 -0.02934318]]
>
>
> So, the values are OK, but the negative signs I don't understand.

Eigenvectors are unique only up to a scale factor. They are typically
reported as normalized to a magnitude of 1, but that still leaves it
ambiguous. If v is an eigenvector, -v is also an eigenvector. Both
norm(v) and norm(-v) == 1. Which one you get is dependent on the
details of the implementation. Both are correct answers.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the SciPy-user mailing list