_Norm
it.grypho.scala.leonardo.matrix._Norm
case class _Norm(x: _Expression, order: NormOrder = ...) extends _Expression
norm(x) and norm(x, kind) (F_0039): a vector's or a matrix's norm.
The shape decides the reading (Decision A, MATLAB's rule, stated because the other reading exists): a row or a column is a vector — and so is a number, as a 1×1 — anything else a matrix. The default is the 2-norm either way, since the vector 2-norm and the spectral norm agree on a column, so the shape decides only what 1 and inf mean: the sum and the largest modulus of a vector, the largest column and row sum of a matrix.
- A vector:
1,2,inf,fro(the 2-norm) and anyp ≥ 1; apbelow 1 is not a norm and stays unevaluated. A complex entry counts by its modulus. InDoublethe 2- andp-norms are scaled by the largest modulus before they are raised, so[[1e200], [1e200]]is1.414…1e200rather than an overflow (the conditioning rule). Exact cells stay exact for1andinf; the 2-norm's root is taken at the working precision. Symbolic cells givesum(abs(xᵢ))or(Σ abs(xᵢ)^p)^(1/p); their max-norm stays unevaluated, since a maximum of unknown magnitudes is not decidable. - A matrix:
1andinfon numeric cells, exact on exact ones;froas above; the 2-norm is the largest singular value through the SVD, nevereigen(AᵀA), which squares the condition number (2.11) — an exact matrix is demoted for it, thesvdprecedent, and a complex one stays unevaluated. Any otherpstays unevaluated.
A SCALAR result, like Determinant, so 1 + norm(x) is a number.
Value parameters
- order
-
which norm
- x
-
the vector or matrix
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait _Expressionclass Objecttrait Matchableclass Any
Members list
In this article