norm returns the approximate norm of a matrix

Messages in english

Modérateur : xcasadmin

belanger
Messages : 59
Inscription : jeu. juil. 27, 2017 3:26 pm

norm returns the approximate norm of a matrix

Message par belanger » jeu. août 23, 2018 2:01 am

The norm command gives the exact value for vectors

Input: norm([1,2,3,-4])

Output: sqrt(30)

For a matrix, though, it returns an approximation.

Input: norm([[1,2],[3,-4]])

Output: 5.11667273602

I get the same result for l2norm in both cases.

The manual (section l2 matrix norm) indicates that it should be exact.

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: norm returns the approximate norm of a matrix

Message par parisse » jeu. août 23, 2018 7:23 am

norm or l2norm on a matrix returns the norm induced by the L2 norm on the vector space where the matrix acts, like matrix_norm(.,2). That must be numeric.
Run frobenius_norm to get sqrt(30).
The French doc seems accurate, while the English doc should probably be completed.

Répondre