Differences between revisions 3 and 4
Revision 3 as of 2024-01-29 20:33:21
Size: 1810
Comment: Introduction
Revision 4 as of 2024-01-29 21:49:40
Size: 2422
Comment: Julia
Deletions are marked like this. Additions are marked like this.
Line 26: Line 26:
The ''y'' axis, and more importantly any vector that only moves on the ''y'' axis, will not be transformed by this '''''A'''''. (And because the linear transformation involves no scaling, ''λ = 1''.) The the vector ''[0 1 0]]'', and importantly any linear transformation of that unit vector, will not be transformed by this '''''A'''''. (And because the linear transformation involves no scaling, ''λ = 1''.)
Line 29: Line 29:

{{{
julia> using LinearAlgebra

julia> A = [0 0 1; 0 1 0; -1 0 0]
3×3 Matrix{Int64}:
  0 0 1
  0 1 0
 -1 0 0

julia> eigvals(A)
3-element Vector{ComplexF64}:
 0.0 - 1.0im
 0.0 + 1.0im
 1.0 + 0.0im

julia> eigvecs(A)
3×3 Matrix{ComplexF64}:
 0.707107-0.0im 0.707107+0.0im 0.0+0.0im
      0.0-0.0im 0.0+0.0im 1.0+0.0im
      0.0-0.707107im 0.0+0.707107im 0.0+0.0im
}}}

Note that the other eigenvectors and eigenvalues are complex. Note also that the eigenvectors are returned as the eigenvector matrix, usually notated as '''''S'''''.

Eigenvalues and Eigenvectors


Introduction

Ax is a linear transformation: A maps the input vector x to the output vector b.

For some linear transformations (i.e. some, but not all, matrices A), there are certain input vectors x where the output vector b is also just a linear transformation of the input vector x. In other words, A mapped x to a scaled version of x. That scaling factor is notated λ.

For example, rotation around the y axis in 3 dimensions by θ degrees is calculated with:

┌                 ┐
│  cos(θ) 0 sin(θ)│
│       0 1      0│
│ -sin(θ) 0 cos(θ)|
└                 ┘

The the vector [0 1 0]], and importantly any linear transformation of that unit vector, will not be transformed by this A. (And because the linear transformation involves no scaling, λ = 1.)

The certain input vectors are the eigenvectors of A. The scaling factors are the eigenvalues of A.

julia> using LinearAlgebra

julia> A = [0 0 1; 0 1 0; -1 0 0]
3×3 Matrix{Int64}:
  0  0  1
  0  1  0
 -1  0  0

julia> eigvals(A)
3-element Vector{ComplexF64}:
 0.0 - 1.0im
 0.0 + 1.0im
 1.0 + 0.0im

julia> eigvecs(A)
3×3 Matrix{ComplexF64}:
 0.707107-0.0im       0.707107+0.0im       0.0+0.0im
      0.0-0.0im            0.0+0.0im       1.0+0.0im
      0.0-0.707107im       0.0+0.707107im  0.0+0.0im

Note that the other eigenvectors and eigenvalues are complex. Note also that the eigenvectors are returned as the eigenvector matrix, usually notated as S.


Definition

Eigenvalues and eigenvectors are the pairs of λ and x that satisfy Ax = λx and |A - λI| = 0.

Unless A is defective, there should be n unique pairs of eigenvectors and eigenvalues. If there is a repeated eigenvalue, there may not be n independent eigenvectors.

Properties

Adding nI to A does not change its eigenvectors and adds n to the eigenvalues.

The sum of the eigenvalues is the trace (sum of diagonal). The product of the eigenvalues is the determinant.


CategoryRicottone

LinearAlgebra/EigenvaluesAndEigenvectors (last edited 2024-02-06 05:04:28 by DominicRicottone)