Matrix models

Eigenvalues and eigenvectors

mat  =  {{0, 2, 1}, {1/2, 0, 0}, {0, 1/3, 0}}

MatrixForm[mat]

Eigenvalues[mat]

N[%]

Eigenvectors[mat]

N[%]

Sensitivity Analysis

mat2  =  {{0, 2, 1}, {p1, 0, 0}, {0, p2, 0}}

eqn  =  Det[ x IdentityMatrix[3]  -  mat2]

eqn2  =  eqn /. {p1 -> 1/2, p2 -> 1/3}

Solve[eqn2 == 0, x] // Simplify

N[%]

sensitivityP1  =  - D[eqn, p1]/D[eqn, x]

sensitivityP1 /. {p1 -> 1/2, p2 -> 1/3, 
        x -> 1.07474}

sensitivityP2  =  -D[eqn, p2]/D[eqn, x]

sensitivityP2 /. {p1 -> 1/2,  p2 -> 1/3, 
        x -> 1.07474}