Frobenius norm
The Frobenius norm is the square root of the sum of squared real matrix entries.
On this page 9 sections
- Overview
- To compare two matrices, subtract matching entries
- A norm is not a sum of absolute entries
- For an approximation error, first form the residual matrix
- The same calculation measures how well a truncated SVD reproduces a data matrix
- Key takeaway
- Further questions
- Sources & further reading
- Concept connections
01To compare two matrices, subtract matching entries#
To compare two matrices, subtract matching entries. You now have a matrix of errors, but often need one number describing their total size. The Frobenius norm treats all those entries like coordinates in one long vector and takes its Euclidean length.
Squaring makes positive and negative errors both contribute. Taking a square root returns the result to the original units. An image difference, for example, becomes a single aggregate pixel-error magnitude; the norm alone does not tell you where the errors occur.
The Frobenius norm treats all entries as one long vector. Square every entry, add all the squares, and take the nonnegative square root.
For rows , the squares total . The norm is .
For error rows , visit all four entries: their squares are . Add to get 9, then take the square root to get 3. Stopping at 9 reports the squared norm. Adding the original entries would let signs cancel and would miss the size of the error.
Matrix rows ; . Give its Frobenius norm.
Show answer and explanation
Squared entries total ; norm .
02A norm is not a sum of absolute entries#
A norm is not a sum of absolute entries. For the single row , the absolute sum is 7, but squared entries total 25, giving norm 5. Off-diagonal entries count just like diagonal entries.
Matrix rows ; . Claimed Frobenius norm . Repair.
Show answer and explanation
Squared entries total ; norm .
03For an approximation error, first form the residual matrix#
For an approximation error, first form the residual matrix. If has rows and has rows , the residual rows are , with norm 5.
Rows : ; . Rows : ; . Give .
Show answer and explanation
Residual rows ; ; norm .
04The same calculation measures how well a truncated SVD reproduces a data matrix#
The same calculation measures how well a truncated SVD reproduces a data matrix. Every entry is weighted equally here. If features use very different units or some pixels matter more, that modeling choice needs attention before interpreting this total as practical quality.
Square every entry, add all the squares, and take the nonnegative square root. For an error norm, subtract the matrices first.
- Compute a matrix's Frobenius norm.
Further questions
Can an SVD give approximation error without rebuilding every entry?
Sources & further reading
- [1]Jay Gopalakrishnan, The Singular Value Decomposition ↗Textbook · Book