help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bad octave norms


From: Vic Norton
Subject: Re: Bad octave norms
Date: Fri, 2 Jan 2004 22:06:12 -0500

Sorry to disagree with you, Glen.

Octave's definition may be in agreement with MATLAB, but it is not in agreement with the accepted mathematical definition. Reread Chapter 2.3, Matrix Norms, of Golub & Van Loan's Matrix Computations.

The p-norm of an (m x n)-matrix matrix A is, by definition,
    norm(A, p) = sup { norm(A * x, p) : norm(x, p) = 1 },
where x is an n x 1 vector. It follows that, if the 1-norm of an n x 1 vector x is
    sum { abs(x(i)) : i = 1,..,n },
then the 1-norm of an m x n matrix A must be
    max { sum { abs(A(i, j)) : i = 1,..,m } : j = 1,..,n }.
Likewise, if the infinity-norm of an n x 1 vector x is
    max { abs(x(i)) : i = 1,..,n },
then the infinity-norm of an m x n matrix A must be
    max { sum { abs(A(i, j)) : j = 1,..,m } : i = 1,..,n }.

Octave and MATLAB have got their definitions right for every m other than 1. Why in the world would they think they should change things when m = 1? Is this just the computer way of doing things? Anything for expediency? But we are talking mathematics here. Mathematics doesn't work this way. Mathematics insists on elegance, on logical consistency. Mathematics is not just a bag of tricks -- no matter what MATLAB thinks!

I suggest suggest that Octave rename its function morn(A, p). That way everyone will know that it just an ad hoc creation, not what mathematicians call the p-norm.

And then there is duality and the relation (1/p) + (1/q) = 1. Start with R^n. The dual space of R^n, (R^n)*, looks just like R^n. So what has this got to do with p's and q's? Just this: the p-norm on (R^n)* is the same as the q-norm on R^n. Column vectors are in R^n; row vectors are in (R^n)*. The only time that R^n and (R^n)* are the same normed spaces is when p = q = 2 -- no matter what MATLAB and Octave say!

BTW, if I recall correctly, complete normed algebras that obey the rule
    norm(A * B) <= norm(A) * norm(B)
are called Banach algebra's, and Banach was doing this stuff way before MATLAB.


Regards,

Vic

At 12:57 PM -0700 1/1/04, Glenn Golden wrote:
Vic,

 The 1 and inf octave norms are not defined correctly for row vectors.
 The definitions should be
     norm(A, 1) = max(abs(A))
     norm(A, inf) = sum(abs(A))
 when rows(A) = 1.


When rows(A) == 1 or columns(A) == 1, then norm(A, p) are vector p-norms
(as opposed to matrix p-norms).  Octave's implementation of them agrees
with Matlab's, and both behave in accordance with the definition of
vector p-norm,

    norm(A, p)   =def=   ( SUM ( |A(k)| ** p) ) ** (1/p)
                            k

in which case

    norm(A, 1)   = sum(abs(A))
    norm(A, inf) = max(abs(A)) .





 A reasonable matrix norm should satisfy
     norm(A * B) <= norm(A) * norm(B).


Octave's matrix p-norms satisfy this.



 The 1 and inf octave norms can violate this condition when A is a row
 vector. For example, set A = [1 0] and B = [1 1; 0 0]. Then
    2 = norm(A * B, 1) > norm(A, 1) * norm(B, 1) = 1.
 Again, set A = [1 1] and B = [1 0; 1 0]. Then
    2 = norm(A * B, inf) > norm(A, inf) * norm(B, inf) = 1.



In your examples, A is a vector, B is a matrix.  In this case, the
requirement for "reasonable" norm behavior (where "reasonable" amounts
to subordinate behavior of matrix p-norms w.r.t. their corresponding
vector p-norms) is

        norm(B * A', p)   <=   norm(B, p) * norm(A', p)

and Octave's (and Matlab's) behavior satisfy this.



Ref: Golub & Van Loan, 1/e, Sec. 2.1, 2.2.

Glenn Golden

--
*---* mailto:address@hidden
|     Victor Thane Norton, Jr.
|     Mathematician and Motorcyclist
|     phone: 419-353-3399
*---* http://vic.norton.name



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]