# Change of basis (to a more structured one) in a dynamic system, wrong result?

Given a time-invariant homogeneous dynamic system $x(k +1) = Ax(k)$, where the system matrix is:

$$A = \begin{bmatrix} 1 & -1 \\ 2 & 4 \\ \end{bmatrix}$$

And an initial state vector $x(0) = \begin{bmatrix}1 \\ 2\end{bmatrix}$, we know that solution is $x(k) = A^kx(0)$:

$$x(2) = A^2x(0) = \begin{bmatrix}-1 & -5 \\ 10 & 14\end{bmatrix}\begin{bmatrix}1 \\ 2\end{bmatrix} = \begin{bmatrix}-11 \\ 38\end{bmatrix}$$

With the help of basis change (new basis would be a matrix $M$, coordinates vector $z$, $x = Mz$), we could write:

$$x(k+1) = Ax(k) \\ Mz(k+1) = AMz(k) \\ z(k+1) = M^{-1}AMz(k)$$

Because $A$ is diagonalizable $M^{-1}AM= \Lambda$, we get the solution (with respect of basis $M$):

$$z(k) = \Lambda^kz(0)$$

Once we know $z(k)$ we can compute $x(k) = Mz(k)$.

## Computation of $M$,$\Lambda$ and $M^{-1}$

$\Lambda$ is the diagonal matrix with the eigenvalues $\lambda_1...\lambda_n$ while $M$ is the matrix whose columns are the eigenvectors $v_1...v_n$ of $A$:

$$\lambda_1 = 2, v_1 = \begin{bmatrix}-1 \\ 1\end{bmatrix}, \lambda_2 = 3, v_2 = \begin{bmatrix}-\frac12 \\ 1\end{bmatrix} \\ M = \begin{bmatrix}-1 & -\frac12 \\ 1 & 1\end{bmatrix}, \Lambda = \begin{bmatrix}2 & 0 \\ 0 & 3\end{bmatrix}, M^{-1} = \begin{bmatrix}-2 & -1 \\ 2 & 2\end{bmatrix},$$

## Computation of $z(0)$

Solution of the linear system $Mz(0) = x(0)$, that is:

$$\begin{bmatrix}-1 & -\frac12 \\ 1 & 1\end{bmatrix}z(0) = \begin{bmatrix}1 \\ 2\end{bmatrix}$$

We get $z(0) = \begin{bmatrix}-4 \\ 6\end{bmatrix}$

## Computation of $z(2)$ and $x(2)$

Easily: $$z(2) = \Lambda^2z(0) = \begin{bmatrix}4 & 0 \\ 0 & 9\end{bmatrix}\begin{bmatrix}-4 \\ 6\end{bmatrix} = \begin{bmatrix}-8 \\ 27\end{bmatrix}\\ x(2) = Mz(2) = \begin{bmatrix}-1 & -\frac12 \\ 1 & 1\end{bmatrix}\begin{bmatrix}-8 \\ 27\end{bmatrix} = \begin{bmatrix}-\frac{11}{2} \\ -19\end{bmatrix}$$

However, result is wrong, it should be $\begin{bmatrix}-11 \\ 38\end{bmatrix}$. Any help?

-

You've written:

$$z(2) = \begin{bmatrix}4 & 0 \\ 0 & 9\end{bmatrix}\begin{bmatrix}-4 \\ 6\end{bmatrix} = \begin{bmatrix}-8 \\ 27\end{bmatrix}$$

However, it should be:

$$z(2) = \begin{bmatrix}4 & 0 \\ 0 & 9\end{bmatrix}\begin{bmatrix}-4 \\ 6\end{bmatrix} = \begin{bmatrix}-16 \\ 54\end{bmatrix}$$

after which $x(2)$ works out.

-
OMG I'm feeling so stupid right now. I've simplified a vector like a fraction, oh my... really thank you!!! –  user34295 Mar 2 '13 at 16:13