Omni Calculator logo

Matrix Norm Calculator

Created by Rijk de Wet
Reviewed by Wojciech Sas, PhD and Steven Wooding
Last updated: Jan 18, 2024


Welcome to the matrix norm calculator. We'll cover the theory behind matrix norms and what they are, as well as the simplified expressions for well-known norms such as the 1-norm, 2-norm, and Frobenius norm of a matrix. With our calculator, you can compute the norm for any matrix of up to size 3×33\times3. So, grab a sandwich and let's get started!

What is the norm of a matrix?

Let's start with a disclaimer: The norm of a matrix does not represent magnitude like the norm of a vector does. Instead, the norm of a matrix AA (sometimes called an induced matrix norm) represents the maximum amount a unit vector x\vec{x} is stretched when multiplied by AA. We can denote this definition, with matrix norm A\Vert A\Vert, as:

A=maxx=1Ax\footnotesize \Vert A\Vert=\max_{\Vert \vec{x}\Vert=1}\Vert A\vec{x}\Vert

In this definition, AA is an m×nm\times n matrix, and x\vec{x} is an n×1n\times1 unit vector. As per the rules of matrix multiplication, we end up with AxA\cdot\vec{x} as an m×1m\times 1 vector. Therefore, Ax\Vert A\cdot\vec{x}\Vert is a vector norm of AxA\cdot\vec{x}.

Just like with vector norms, there's more than one matrix norm. Which matrix norm we're calculating above depends on which vector norm we're using on AxA\cdot\vec{x}.

So, in this definition, we choose \Vert \cdot\Vert to be one specific vector norm. For example, if we pick \Vert \cdot\Vert to be the 2-norm 2\Vert \cdot\Vert _{2}, then we'll be computing the 2-norm of the matrix, A2\Vert A\Vert _2. This is why we call many matrix norms "induced matrix norms", as they are induced when using their accompanying vector norm on AxA\cdot\vec{x}.

Matrix norms have many adjacent uses. Its most frequent use is in calculating a matrix's condition number, which builds on the fact that matrix norms represent the magnitude of stretching a vector.

How to calculate the norm of a matrix?

The mathematical definition is valuable in theory, but it would be difficult to compute it directly. Lucky for us, we can simplify the formula for various matrix norms. We'll cover the following norms:

  • The 1-norm, A1\Vert A\Vert _1;
  • The infinity norm, A\Vert A\Vert _∞;
  • The 2-norm, A2\Vert A\Vert _2;
  • The Frobenius norm, AF\Vert A\Vert _F; and
  • The max norm, Amax\Vert A\Vert _{\max}.

You can easily obtain the 1-norm of the matrix by summing each column of AA and selecting the maximum:

A1=max1jni=1mai,j\footnotesize \Vert A \Vert_1 = \max_{1 \le j \le n} \sum_{i=1}^m |a_{i,j}|

Similarly, you can obtain the infinity norm of the matrix by summing each row of AA and selecting the maximum:

A=max1imj=1nai,j\footnotesize \Vert A\Vert_\infty = \max_{1 \le i \le m} \sum_{j=1}^n |a_{i,j}|

We can evaluate the 2-norm of the matrix by taking the largest eigenvalue of ATAA^T\cdot A (AA's transpose multiplied with AA) and calculating its square root:

A2=λmax(ATA)\footnotesize \Vert A\Vert_2 = \sqrt{\lambda_{\max}(A^T\!\cdot\!A)}

The Frobenius norm of AA is also sometimes called the matrix Euclidean norm, as the two concepts are quite similar. It's obtained by summing the elements on ATAA^T\cdot A's diagonal (its trace) and taking its square root.

AF=trace(ATA)\footnotesize \Vert A\Vert_F = \sqrt{\text{trace}(A^T\!\cdot\!A)}

Lastly, the max norm of AA can be obtained by simply taking the largest value in AA:

Amax=maxi,jai,j\footnotesize \Vert A\Vert_{\max} = \max_{i,j} |a_{i,j}|

How to use the matrix norm calculator?

The calculations for matrix norms can be tedious to perform over and over again — that's why we made this matrix norm calculator! Here's how to use it:

  1. Select your matrix's dimensionality. You can pick anything up to 3×33\times3.
  2. Enter your matrix's elements, row by row.
  3. Find your matrix's norms at the very bottom! These are the 1-norm, infinity norm, 2-norm, Frobenius norm, and the max norm. You can take a peek above for their formulas.

How to compute the matrix norm? – An example

Let's use these formulas and see how to calculate all these norms of a matrix in practice. Consider our 3×33\times3 matrix AA:

A=[226139610]\footnotesize A = \begin{bmatrix} 2 & 2 & 6 \\ 1 & 3 & 9 \\ 6 & 1 & 0 \\ \end{bmatrix}

We can calculate the 1-norm of the matrix by summing each column and picking the maximum column sum. So,

A1=max(2+1+6, 2+3+1, 6+9+0)=max(9, 6, 15)=15\footnotesize \Vert A\Vert_1 \\ = \max(2\!+\!1\!+\!6,\ 2\!+\!3\!+\!1,\ 6\!+\!9\!+\!0) \\ = \max(9,\ 6,\ 15) \\ = 15

Similarly, we can calculate the infinity norm of the matrix by summing each row and picking the maximum row sum. Therefore,

A=max(2+2+6, 1+3+9, 6+1+0)=max(10, 13, 7)=13\footnotesize \Vert A\Vert_\infty \\ = \max(2\!+\!2\!+\!6,\ 1\!+\!3\!+\!9,\ 6\!+\!1\!+\!0) \\ = \max(10,\ 13,\ 7) \\ = 13

To calculate the Frobenius norm and the 2-norm of the matrix, we need ATAA^T\cdot A.

ATA=[4113211314392139117]\footnotesize A^T\cdot A = \begin{bmatrix} 41 & 13 & 21 \\ 13 & 14 & 39 \\ 21 & 39 & 117 \\ \end{bmatrix}

For calculating the 2-norm, we first obtain ATAA^T\cdot A's eigenvalues to be

λ1=136.19λ2=0.03λ3=35.78\footnotesize \begin{split} \lambda_1 &= 136.19 \\ \lambda_2 &= 0.03 \\ \lambda_3 &= 35.78 \\ \end{split}

The largest eigenvalue is 136.19136.19, and its square root is 11.6711.67. Therefore, A2=11.67\Vert A\Vert_2 = 11.67.

For the Frobenius norm / matrix Euclidean norm, we sum the diagonal elements of ATAA^T\cdot A to obtain

trace(ATA)= 41+14+117= 172\footnotesize \text{trace}(A^T\cdot A) \\ = \ 41 + 14 + 117 \\ = \ 172

Lastly, the max norm is simply the largest value in AA. Therefore, Amax=9\Vert A\Vert_{\max} = 9.

And there you have it! We've determined each norm for a 3×33\times3 matrix.

FAQ

What is the Frobenius norm of the identity matrix?

The Frobenius norm of an n×n identity matrix Ɪn is √n, because ꞮT = Ɪ and then ꞮT · Ɪ = Ɪ. We can therefore conclude that

‖Ɪ‖F = √trace(ꞮT · Ɪ)
‖Ɪ‖F = √trace(Ɪ)
‖Ɪ‖F = √n

as Ɪ consists of only 1s on its diagonal.

Do rectangular matrices have norms?

All matrices have norms. The norms that use operations exclusive to square matrices, such as eigenvalues and traces, perform them on square matrices derived from the original matrix. Therefore, whether or not a matrix is square doesn't matter for matrix norms.

What does ‖A‖ mean in matrices?

‖A‖ is the notation for a matrix norm. The exact norm is usually specified as a subscript to the norm, such as ‖A‖2. This means that we used the vector 2-norm to find the maximum amount of stretching in. Don't confuse the notation for the matrix norm ‖A‖ with the notation for matrix determinant |A|.

Can a matrix norm be less than 1?

Yes. If a matrix shrinks a vector space instead of stretching it out, the matrix norm will be less than 1 to reflect that shrink. A matrix norm of 0.5 means that the vector space has been shrunk to half its original size. A matrix norm of 0 means that the matrix collapsed the vector space into a point, and that all vectors in that space are now zero vectors.

Rijk de Wet
A=
a₁a₂
b₁b₂
Matrix size
2x2
First row
a₁
a₂
Second row
b₁
b₂
Check out 35 similar linear algebra calculators 🔢
Adjoint matrixCharacteristic polynomialCholesky decomposition… 32 more
People also viewed…

Linear feedback shift register

Learn how the linear-feedback shift register works with our LFSR calculator. Discover the types and the uses of this useful but hidden informatics tool!

Lost socks

Socks Loss Index estimates the chance of losing a sock in the laundry.

Right triangle trigonometry

Discover the relationship between trigonometry and triangles with Omni's right triangle trigonometry calculator!

Snowman

The perfect snowman calculator uses math & science rules to help you design the snowman of your dreams!
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service