What this calculator does
This tool computes four of the most widely used matrix norms for any real n x m matrix \(A = \{a_{ij}\}\): the L1 norm (maximum absolute column sum), the L2 / spectral norm (the largest singular value), the Frobenius norm (root sum of squares of all entries), and the L-infinity norm (maximum absolute row sum). Matrix norms measure the "size" of a matrix and the maximum factor by which it can stretch a vector, making them essential in numerical linear algebra, optimization, machine learning and stability analysis. This is pure mathematics and is identical everywhere.
How to use it
Set the number of rows (\(n\)) and columns (\(m\)), then type the matrix into the text box one row per line, with entries separated by spaces or commas. Any blank cell is treated as 0. Choose how many significant digits to display, then read off all four norms. Negative entries are handled automatically because each formula uses absolute values where required.
The formulas explained
The 1-norm sums absolute values down each column and keeps the largest total. The infinity-norm does the same across each row. The Frobenius norm flattens the matrix into a vector and takes its Euclidean length: sqrt of the sum of every entry squared. The spectral norm equals the largest singular value \(\sigma_{\max}(A)\), found as the square root of the largest eigenvalue of the symmetric Gram matrix A-transpose A; we obtain that eigenvalue by power iteration. An all-zero matrix short-circuits every norm to 0.
$$\|\text{A}\|_{1} = \max_{1 \le j \le m} \sum_{i=1}^{n} |a_{ij}|$$$$\|\text{A}\|_{\infty} = \max_{1 \le i \le n} \sum_{j=1}^{m} |a_{ij}|$$$$\|\text{A}\|_{F} = \sqrt{\sum_{i=1}^{n} \sum_{j=1}^{m} a_{ij}^{2}}$$$$\|\text{A}\|_{2} = \sigma_{\max}(\text{A}) = \sqrt{\lambda_{\max}\!\left(\text{A}^{\mathsf{T}}\text{A}\right)}$$
Worked example
For \(A = [[1, 2], [3, 4]]\): column sums are 4 and 6 so the L1 norm is 6; row sums are 3 and 7 so the L-infinity norm is 7. The Frobenius norm is $$\sqrt{1+4+9+16} = \sqrt{30} = 5.4772255751.$$ The Gram matrix \(A^{\mathsf{T}}A = [[10,14],[14,20]]\) has eigenvalues solving \(\lambda^{2} - 30\lambda + 4 = 0\), giving \(\lambda_{\max} = 29.8660687473\), so the spectral norm is $$\sqrt{29.8660687473} = 5.4649857042.$$
FAQ
Is the spectral norm the same as the Frobenius norm? Only for rank-1 matrices (such as a single row or column vector). In general \(\|A\|_2 \le \|A\|_F\), which is at most \(\sqrt{\text{rank}}\) times \(\|A\|_2\).
What about complex matrices? Replace each entry by its magnitude in the absolute-value parts and use the conjugate transpose for the spectral norm. This calculator targets real matrices.
Why does the L1 norm use columns and L-infinity use rows? These are the induced (operator) norms from the L1 and L-infinity vector norms, and they work out to maximum column and row sums respectively.