From bug-octave-request at bevo dot che dot wisc dot edu Thu Jan 1 13:58:12 2004 Subject: Re: Bad octave norms From: Glenn Golden To: Vic Norton Cc: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 01 Jan 2004 12:57:33 -0700 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 ------------------------------------------------------------- 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 -------------------------------------------------------------