Visually understand the notation for the Frobenius norm of a matrix

548 Views Asked by At

I was watching a video lecture on vector and matrices norms, and I discovered there's the Frobenius norm of a matrix, which is defined as follows:

$$\|A\|_F=\sqrt{\sum_{i=1}^m\sum_{j=1}^n |a_{ij}|^2}$$

I realized that I'm not familiar with the notation of putting on one more $\sum$ symbols one after the other, and therefore I'm not able to intuitively grasp the meaning of that formula whenever I see it, even though it should be something simple.

It should be something like a nested for loop in programming, but I would like to listen to an exact precise answer which explains that formula.

1

There are 1 best solutions below

0
On

That expression is simply a sum of sums. I've added a set of parentheses for clarity:

$$\sqrt{\sum_{i=1}^m\left(\sum_{j=1}^n|a_{ij}|^2\right)}$$

Here's how this expression would look as code:

sum = 0;
for i = 1..m {
  for j = 1..n {
    sum += abs(a[i,j])**2;
  }
}
return sqrt(sum);

The Frobenius norm of a matrix is therefore simply the Euclidean norm of a vector with the same entries as the matrix.