I have the following square matrix
$$ A = \begin{bmatrix} 2 & 0 & 0 \\ 6 & -1 & 0 \\ 1 & 3 &-1 \end{bmatrix} $$
I found the eigenvalues:
$2$ with algebraic and geometric multiplicity $1$ and eigenvector $(1,2,7/3)$.
$-1$ with algebraic multiplicity $2$ and geometric multiplicity $1$; one eigenvector is $(0,0,1)$.
Thus, matrix $A$ is not diagonizable. My questions are:
How can I find the Jordan normal form?
How I can find the dimension of the eigenspace of eigenvalue $-1$?
In Sagemath, how can I find the dimension of the eigenspace of eigenvalue $-1$?
Answer
The SageMath commands to compute anything about this matrix
are easy to discover.
Define the matrix:
sage: a = matrix(ZZ, 3, [2, 0, 0, 6, -1, 0, 1, 3, -1])
and then type a.jor
and then a.eig
, where
means hit the TAB key. This will show you the
methods that can be applied to a
that start with jor
and with eig
.
Then, once you found the method a.jordan_form
, read its
documentation by typing a.jordan_form?
followed by TAB
or ENTER.
You will find that you can call a.jordan_form()
to get
the Jordan form, or a.jordan_form(transformation=True)
to also get the transformation matrix.
sage: j, p = a.jordan_form(transformation=True)
sage: j
[ 2| 0 0]
[--+-----]
[ 0|-1 1]
[ 0| 0 -1]
sage: p
[ 1 0 0]
[ 2 0 1]
[7/3 3 0]
Here is an exploration of the eigenvalues, eigenspaces,
eigenmatrix, eigenvectors.
sage: a.eigenvalues()
[2, -1, -1]
sage: a.eigenspaces_right()
[
(2, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[ 1 2 7/3]),
(-1, Vector space of degree 3 and dimension 1 over Rational Field
User basis matrix:
[0 0 1])
]
sage: a.eigenmatrix_right()
(
[ 2 0 0] [ 1 0 0]
[ 0 -1 0] [ 2 0 0]
[ 0 0 -1], [7/3 1 0]
)
sage: j, p
(
[ 2| 0 0]
[--+-----] [ 1 0 0]
[ 0|-1 1] [ 2 0 1]
[ 0| 0 -1], [7/3 3 0]
)
sage: a.eigenvectors_right()
[(2, [
(1, 2, 7/3)
], 1), (-1, [
(0, 0, 1)
], 2)]
No comments:
Post a Comment