I'm currently trying to do some experiments on linear solver. However, it's a little hard to get the sense of the numbers.
For example, I know large condition number is bad, but how large is bad? $10$, $100$, or $10^6$?
Now I'm trying to use GMRES (with SciPy.sparse) to solve a sparse linear system. The matrix I used comes from Matrix Market - bcssstk16 ($4884 \times 4884$, condition number is $65$).
I construct $x = \begin{pmatrix} 1 \\ \vdots \\ 1 \end{pmatrix}$, and $b = Ax$.
Then I use GMRES to solve $y = GMRES(A, b)$
The result I got: $ \| y - x \| = 8.6025$ and $ \| Ay - b \| = 104546.2078 $.
It doesn't seem to be a accurate answer to me (jesus, $104546$!), but the package said that this is a "converged successfully" solution.
Therefore, my question is: in numerical, how to evaluate if a solution is accurate? The difference of $Ay$ and $b$ should be in what range? and $\| x - y \|$ should be in what range? and a condition number should be in what range to be "good"?
When evaluating the accuracy of your solution, you must think in relative quantities. For example, the system $Ax=b$ has the same solution as $(\alpha A)x=(\alpha b)$, but, given the same approximation $y$ of that $x$, the residuals in the scaled system are $\alpha$-times the residuals in the original one since $(\alpha b)-(\alpha A)y=\alpha(b-Ay)$. So if you have nothing better at hand, consider the relative residual norm $$ \frac{\|b-Ay\|}{\|b\|}. $$ You can do even better, consider the backward error instead: $$ \frac{\|b-Ay\|}{\|A\|\|y\|+\|b\|}. $$ Note that both these quantities are invariant with respect to the scalar scaling of the system.
Classical perturbation results roughly state that $$ \text{forward error} = \text{condition number} \times \text{backward error}. $$ So, if your backward error is of the order, say, $10^{-p}$, and the condition number is of the order $10^q$, then your solution has approximately $p-q$ valid digits.
Nevertheless, there is no precise definition of the accuracy as it may often depend on the application where your $Ax=b$ comes from. There are cases where "hunting" for the largest possible number of valid digits in (often only intermediate) solutions is meaningless. A typical example is the Lanczos algorithm for eigenvalues.