Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0 |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0*From*: Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx>*Date*: Mon, 19 Jul 2010 09:23:28 +0200

On 07/18/10 00:32:26, Benoit Jacob wrote: > 2010/7/17 Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx>: > > On Sat, 17 Jul 2010, Benoit Jacob wrote: > > > >> Another reason why we decided not to expose condition numbers in > Eigen > >> is that for the main purpose they're used for, namely checking if > a > >> result is reliable, there is a better approach which is: check the > >> result itself. For example, if you want to check how accurate your > >> matrix inverse is, just compute matrix*inverse and see how close > it > is > >> to the identity matrix. Nothing beats that! When it comes to more > >> general solving with potentially non full rank matrices, this is > even > >> better, because the condition number of the lhs matrix alone > doesn't > >> tell all you need to know (it also depends on your particular > rhs), > so > >> the approach we're recommending in Eigen, to compute lhs*solution > and > >> compare with rhs, is the only way to know for sure how good your > >> solution is. > > > > I'm not sure I agree. The residual (lhs * solution - rhs) is > certainly > > useful, but so is the condition number (norm of A multiplied by > norm > of > > A^{-1}, where I deliberately don't specify the norm used). If the > residual > > is zero but the condition number is huge then you probably should > not trust > > the solution, > > If (lhs * solution - rhs) is small compared to rhs, then what more > could you ask for? A lot more! A linear equation A x = b is a mathematical problem. If it has a solution the users wants an approximation to that. If I find a vector x which satisfies norm(A*x-b) = tiny in finite arithmetic, that doesn't say much about norm(x_computed - x_true) unless I have a bound on the condition number. And in some cases the mathematical matrix A is singular while the numerical matrix is not (just has a huge condition number). So, the users needs an estimate of norm(x_computed - x_true) . Helmut. -- Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - Aachen University D 52056 Aachen, Germany

**Follow-Ups**:**Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0***From:*Benoit Jacob

**References**:**Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Behavior of sum() and prod() for empty vectors** - Next by Date:
**Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0** - Previous by thread:
**Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0** - Next by thread:
**Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |