# Condition number of empty matrix

조회 수: 3(최근 30일)
Robert van de Geijn 2022년 6월 20일
댓글: Robert van de Geijn 2022년 6월 23일
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표시숨기기 이전 댓글 수: 6
Robert van de Geijn 2022년 6월 22일
Let me now complicate matters even more with some more musings...
However, if anything, x being a 0 x 1 vector (a vector with no elements), its length (2-norm) must be 0, and hence it is the zero vector. Thus, the 2-norm of a 0 x 0 matrix cannot be defined...
If the 2-norm cannot be defined, then the condition number cannot be defined...

댓글을 달려면 로그인하십시오.

### 채택된 답변

Christine Tobler 2022년 6월 23일
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표시숨기기 이전 댓글 수: 8
Robert van de Geijn 2022년 6월 23일
As a purist, I consider a matrix to strictly be a convenient representation of a linear transformation. So, the first questions are
1) is R^0 (or C^0) a vector space?
2) Are there linear transformations that map R^0 to R^0?
3) How are these linear transformations represented as (0 x 0) matrices?
That establishes whether [] is even a matrix.
Let's say that the answers are
1) Yes, and its only element is the 0 x 1 vector, which then must be the zero vector, since the zero vector must be in the space.
2) Yes, only one: the linear transformation that maps the 0 x 1 to itself.
3) The matrix that represents it then is [] (the 0 x 0 matrix).
At this point we can start discussing the norm (let's stick to the 2-norm).
a) Since the 0 x 1 vector is the zero vector, its norm equals 0.
b) While the 2-norm for n > 0 is defined as max_x \neq 0 || A x ||, it is better to go back to thinking about linear transformations. The "size" (2-norm) of a linear transformation really measures by how much the linear transformation stretches the vector to which it is applied. One can argue that the linear transformation
a) maps the 0 x 1 vector to the zero vector and hence || A || = 0
b) maps the 0 x 1 vector to itself and hence A = I and || A || = 1
c) stetches the 0 x 1 vector by any nonnegative integer, since it is the zero vector.
The fact that all of these can be reasonably argued to me indicates that the condition number is ill-defined. Hence, I believe NaN or "not defined" are the only results in the running.
Now, it may be that since matlab is used as a tool for manipulating arrays in addition to matrices, it is convenient to define it differently. But then we should not really call it the condition number. It is merely the matlab operation that is denoted by cond().

댓글을 달려면 로그인하십시오.

### 범주

Find more on Linear Algebra in Help Center and File Exchange

R2022a

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by