1

I am totally new to Mathematica and trying to use it as a companion of some courses in linear algebra and ML.

When studying eigenvalues and eigenvectors you have the following equation:

$$ A {v} = \lambda {v} $$

$$ (A - \lambda I ){v} = 0 $$

For a $2x2$ matrix

$$ A=\begin{pmatrix} a & b\\ c & d \end{pmatrix} $$

You have:

$$ \begin{pmatrix} a - \lambda & b\\ c & d - \lambda \end{pmatrix} = 0 $$

Making its determinant equal to zero we land into the characteristic polynomial:

$$ \begin{vmatrix} a - \lambda & b\\ c & d - \lambda \end{vmatrix} = 0 = \lambda^2 - (a+d)\lambda + ad - bc $$

How could I land into the very same expression in Mathematica?

This is what I tried:

A = {{a , b}, {c, d}} // MatrixForm
id = {{1, 0}, {0, 1}} // MatrixForm
A - \[Lambda] id
CharacteristicPolynomial[A - \[Lambda] id, x]
M.E.
  • 333
  • 1
  • 7
  • 6
    Hi. You need to correct two things. First, drop all // MatrixForm. Second, use CharacteristicPolynomial[A,x], you do not have to subtract a multiple of the identity matrix by hand. – user293787 Aug 13 '22 at 09:16

0 Answers0