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

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


2010/7/19 Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx>:
> 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.

I see,
    x   =   A^{-1} A x    ~=   A^{-1} b
so what you need to conclude how accurate x is, is a bound on the norm
of A^{-1} which is closely related to certain notions of condition
number.

OK, that makes sense. Good point!

Benoit



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