#1286 wrong matrix norms


(%i1) load(linearalgebra)
0 errors, 0 warnings
(%o1) /usr/share/maxima/5.13.0/share/linearalgebra/linearalgebra.mac
(%i2) a:matrix([1,2,3]);
(%o2) [ 1 2 3 ]
(%i3) mat_norm(a,1);
(%o3) 3
(%i4) mat_norm(a,inf);
(%o4) 6

norm 1 should be 6 and norm inf should be 3

Tested in versions 5.10 and 5.13.


  • Barton Willis

    Barton Willis - 2007-10-25

    Logged In: YES
    Originator: NO

    The *matrix* one-norm is the largest column sum; the *matrix* infinity-norm is the largest
    row sum. So mat_norm(matrix([1,2,3]),1) --> 3 and mat_norm(matrix([1,2,3]),'inf) --> 6 are
    correct. You might be thinking that Maxima should convert matrix([1,2,3]) into the *vector*
    [1,2,3]. Indeed, the one-norm of the *vector* [1,2,3] is 6 and the infinity norm of the
    *vector* [1,2,3] is 3. But I think that such an automatic conversion is a bad idea. Maxima
    should have a vector type, but it doesn't.

    Unless somebody shows me that I'm mistaken, I'll mark this bug as invalid in a few days.
    Thanks for the report.

  • Barton Willis

    Barton Willis - 2007-10-28
    • status: open --> pending
  • SourceForge Robot

    Logged In: YES
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

  • SourceForge Robot

    • status: pending --> closed

Log in to post a comment.