eig2 edit page

eigenvalue and vectors of a symmetric 2x2 matrix

Syntax

lambda = eig2(M)
lambda = eig2(a11,a12,a22)
[lambda,v1,v2] = eig2(a11,a12,a22)
[lambda,omega] = eig2(a11,a12,a22)

Input

M array of symmetric 2x2 matrix
a11, a12, a22 vectors of matrix elements

Output

lambda eigen values (first column small one, second column large one)
v1 list of eigen vectors to the smallest eigen value
v2 list of eigen vectors to the largest eigen value
omega angle of the largest eigen vector in [0,pi]