# picos.expressions.exp_norm¶

Implements Norm.

Classes

class picos.expressions.exp_norm.Norm(x, p=2, q=None, denominator_limit=1000)[source]

Entrywise -norm or -norm of an expression.

This class can represent the absolute value, the modulus, a vector -norm and an entrywise matrix -norm of a (complex) affine expression. In addition to these convex norms, it can represent the concave generalized vector -norm with .

Not all of these norms are available on the complex field; see the definitions below to learn more.

Definition

If is not given (None), then it is set equal to .

1. If the normed expression is a real scalar , then this is the absolute value

The parameters and are ignored in this case.

2. If the normed expression is a complex scalar , then this is the modulus

The parameters and are ignored in this case.

3. If the normed expression is a real vector and , then this is the (generalized) vector -norm

for with and the absolute value of the -th entry of .

Note that for the expression is not convex and thus not a proper norm. However, it is concave over the nonnegative orthant and posing a lower bound on such a generalized norm yields a convex constraint for .

Warning

When you pose a lower bound on a concave generalized norm (), then PICOS enforces through an auxiliary constraint during solution search.

Special cases:

• For , this is the Manhattan or Taxicab norm .

• For , this is the Euclidean norm .

• For , this is the Maximum, Chebyshev, or Infinity norm .

4. If the normed expression is a real vector and , then it is treated as a matrix with a single row or a single column, depending on the shape associated with . See case (5).

5. If the normed expression is a complex vector and , then the definition is the same as in case (3) but with , the modulus of the -th entry of , and .

6. If the normed expression is a real matrix , then this is the -norm

for with .

If , then this is equal to the (generalized) vector -norm of the the vectorized matrix, that is . In this case, the requirement is relaxed to and may be a complex matrix. See case (3).

Special cases:

• For , this is the Frobenius norm .

• For , , this is the maximum absolute column sum

This equals the operator norm induced by the vector -norm. You can obtain the maximum absolute row sum (the operator norm induced by the vector -norm) by first transposing .

7. Complex matrix norms are not supported.

Note

You can write in Python as float("inf").

__init__(x, p=2, q=None, denominator_limit=1000)[source]

Construct a Norm.

Parameters
• x (ComplexAffineExpression) – The affine expression to take the norm of.

• p (float) – The value for , which is cast to a limited precision fraction.

• q (float) – The value for , which is cast to a limited precision fraction. The default of None means equal to .

• denominator_limit (int) – The largest allowed denominator when casting and to a fraction. Higher values can yield a greater precision at reduced performance.

property p

The parameter .

This is a limited precision version of the parameter used when the norm was constructed.

property pden

The limited precision fraction denominator of .

property pnum

The limited precision fraction numerator of .

property q

The parameter .

This is a limited precision version of the parameter used when the norm was constructed.

property qden

The limited precision fraction denominator of .

property qnum

The limited precision fraction numerator of .

property x

Real expression whose norm equals that of the original expression.

class picos.expressions.exp_norm.NuclearNorm(x)[source]

The nuclear norm of a matrix.

This class can represent the nuclear norm of a matrix-affine expression (real- or complex valued). The nuclear norm is convex, so we can form expressions of the form NuclearNorm(X) <= t which are typically reformulated as LMIs that can be handled by SDP solvers.

Definition

If the normed expression is a matrix , then its nuclear norm is

where the denote the singular values of a , and denotes the adjoint matrix of (i.e., the transposed matrix if is real-valued).

Special cases:

• If is scalar, then reduces to the the absolute value (or modulus) .

• If is scalar, then coincides with the Euclidean norm of .

__init__(x)[source]

Construct a NuclearNorm.

Parameters

x (ComplexAffineExpression) – The affine expression to take the norm of.

property x

Real expression whose norm equals that of the original expression.

class picos.expressions.exp_norm.SpectralNorm(x)[source]

The spectral norm of a matrix.

This class can represent the spectral norm of a matrix-affine expression (real- or complex valued). The spectral norm is convex, so we can form expressions of the form SpectralNorm(X) <= t which are typically reformulated as LMIs that can be handled by SDP solvers.

Definition

If the normed expression is a matrix , then its spectral norm is

where denotes the largest eigenvalue of a matrix, and denotes the adjoint matrix of (i.e., the transposed matrix if is real-valued).

Special cases:

• If is scalar, then reduces to the the absolute value (or modulus) .

• If is scalar, then coincides with the Euclidean norm of .

__init__(x)[source]

Construct a SpectralNorm.

Parameters

x (ComplexAffineExpression) – The affine expression to take the norm of.

property x

Real expression whose norm equals that of the original expression.