matlab matrix error when computing norm

49 Views Asked by At

Now I have $A =$ $$\begin{bmatrix}0.2 & 0.4\\ 0.21&0.39 \end{bmatrix}$$, and $b=$ $$\begin{bmatrix}0.6\\0.6\\ \end{bmatrix}$$ $\\$

When I solve $Ax=b$, I have the answer $x =$ $$\begin{bmatrix}1\\1\\ \end{bmatrix}$$.

But when I type in norm(A\[.6;.6] - [1;1]), I got an error of $\, 1.9 × 10^{−15}$. And when I solve $A^{5}x=b^{5}$, I type norm(A^5\[.6^5;.6^5] - [1;1]), I got a greater error $1.4 × 10^{−7} $

Why does this happen? Is this related to the machine-$\epsilon$?

2

There are 2 best solutions below

0
On

$$ A x = b \iff x = A^{-1} b $$ is equivalent (same solution $x$) iff $A$ is invertible and $$ A^5 x = A^4 b \iff x = (A^5)^{-1} A^4 b = (A^{-1})^5 A^4 b = A^{-1} b $$ I assume $A^4 b \ne b^5$ in general, so that must be a different $x$ you are solving for.

0
On

This is an ill-conditioned problem. Small errors in storing any values will create very different answers. In this case partly linked to the very small determinant of A.