matrix-p-norm ( m p -- n ) (original) (raw)

Vocabulary
math.matrices

Inputs

m a matrix
p a positive real number

Outputs

n a non-negative real number

Word description
Find the norm (size) of a matrix in 𝑙ₚ (L^p) vector space, usually written ∥・∥ₚ. For p ≠ 1, 2, ∞, this is an "entry-wise" norm.

Notes

User code should call the generic p-norm instead.
This word is the matrix-specific variant of p-norm.
This word is the p = q variant of matrix-p-q-norm.
This word is intended for use with "flat" (2-dimensional) matrices.

Examples
Calls l1-norm:

USING: math.matrices prettyprint ; 4 4 1 1 matrix-p-norm .
4

Falls back to matrix-p-norm-entrywise:

USING: math.functions math.matrices prettyprint ; 2 2 3 1.5 matrix-p-norm 7.559 10e-4 ~ .
t

See also
matrix-l1-norm, matrix-l2-norm, matrix-l-infinity-norm, matrix-p-q-norm

Definition