solve(x^2 - 3*x + 2 = 0)

{[x = 1], [x = 2]}

A := matrix([[7,3],[3,-1]])

matrix([[7, 3], [3, -1]])

A^-1

matrix([[1/16, 3/16], [3/16, -7/16]])

det(A)

-16

identity := matrix([[1,0],[0,1]])

matrix([[1, 0], [0, 1]])

charpoly := det(A - `λ`*identity)

`λ`^2 - 6*`λ` - 16

solve(charpoly)

{[`λ` = -2], [`λ` = 8]}

linalg::eigenvalues(A)

{-2, 8}

linalg::eigenvectors(A)

[[-2, 1, [matrix([[-1/3], [1]])]], [8, 1, [matrix([[3], [1]])]]]

clear

clear

clc

clc

P:= matrix([[0.97,0.05,0.10],[0.00,0.90,0.05],[0.03,0.05,0.85]])

matrix([[0.97, 0.05, 0.1], [0, 0.9, 0.05], [0.03, 0.05, 0.85]])

linalg::eigenvectors(P)

[[1.0, 1, [matrix([[0.9658342616], [0.1159001114], [0.2318002228]])]], [0.9109901951, 1, [matrix([[0.7659408734], [-0.6279213172], [-0.1380195561]])]], [0.8090098049, 1, [matrix([[-0.3672241357], [-0.4479414339], [0.8151655696]])]]]

charpoly:= det(P - `λ`*matrix([[1,0,0],[0,1,0],[0,0,1]]))

- 1.0*`λ`^3 + 2.72*`λ`^2 - 2.457*`λ` + 0.737

solve(charpoly=0)

{[`λ` = 1.0], [`λ` = 0.8090098049], [`λ` = 0.9109901951]}

B := matrix([[7,-2],[2,3]])

matrix([[7, -2], [2, 3]])

cp := linalg::charpoly(B,x)

x^2 - 10*x + 25

identity := matrix([[1,0],[0,1]])

matrix([[1, 0], [0, 1]])

det(B - `λ`*identity)

(`λ` - B)^2

factor(cp)

(x - 5)^2

linalg::eigenvectors(B)

[[5, 2, [matrix([[1], [1]])]]]

B*matrix([1,1])

matrix([[5], [5]])