Condition number of empty matrix
6 views (last 30 days)
Show older comments
Robert van de Geijn
on 20 Jun 2022
Commented: Robert van de Geijn
on 23 Jun 2022
if is a 0 x 0 matrix, then cond( A ) returns 0. However, we know that the condition number is always >= 1. Also, one could argue that the empty matrix is an identity matrix, and hence its condition number should equal 1.
Any particular reason why matlab made this choice?
7 Comments
Accepted Answer
Christine Tobler
on 23 Jun 2022
The case of a 0-by-0 matrix doesn't have any very useful definition, as you note correctly in the comments above.
MATLAB does what it does because it computes any p-condition number using the formula:
norm(A, p) * norm(inv(A), p)
and of course the norm of [] is 0, as is the norm of the inverse of [].
A legitimate question could be if the norm of a [] matrix should be 0, or if it should be NaN since this matrix can't be mulitplied with a vector that has norm 1. But in practical terms, I think it's more useful to define this norm as being 0 than returning NaN.
9 Comments
Paul
on 23 Jun 2022
Edited: Paul
on 23 Jun 2022
@Steven Lord, thanks for the link.
My assumption that TMW invented Matlab's [original] empty matrix implementation was based on the actual statement in the doc at that time (from that link's link to deBoor):
"'As far as we know, the literature on the algebra of empty matrices is itself empty. We're not sure we've done it correctly, or even consistently, but we have found the idea useful."
Perhaps I should have said: I always thought that the TMW implementation of Matlab's empty matrix was basically a TMW construct.
No matter, obviously. I just have an historical interest.
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!