Lesson 10 of 15

Matrix Norms

Matrix Norms

A matrix norm A\|A\| measures the "size" of a matrix. Different norms capture different aspects of the matrix.

Frobenius Norm

The most common: sum of squares of all entries, then square root.

AF=i,jaij2\|A\|_F = \sqrt{\sum_{i,j} a_{ij}^2}

Analogous to the Euclidean length of the vector of all entries.

Infinity Norm (Max Row Sum)

The maximum absolute row sum — the worst-case amplification when multiplying a vector with v1\|\mathbf{v}\|_\infty \leq 1.

A=maxijaij\|A\|_\infty = \max_i \sum_j |a_{ij}|

1-Norm (Max Column Sum)

The maximum absolute column sum.

A1=maxjiaij\|A\|_1 = \max_j \sum_i |a_{ij}|

Example

A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}

AF=1+4+9+16=305.4772\|A\|_F = \sqrt{1+4+9+16} = \sqrt{30} \approx 5.4772

A=max(1+2, 3+4)=7.0000,A1=max(1+3, 2+4)=6.0000\|A\|_\infty = \max(1+2,\ 3+4) = 7.0000, \qquad \|A\|_1 = \max(1+3,\ 2+4) = 6.0000

Your Task

Implement frobenius_norm(A), infinity_norm(A), and one_norm(A).

Python runtime loading...
Loading...
Click "Run" to execute your code.