Normed and Inner Product Spaces



Matrix Norms

Matrix Norms

Given two normed linear spaces ( V1, | · |1 ) and ( V2, | · |2 ) the induced norm on the linear transformations L : V1V2 is defined as
| L | = sup{ | L x |2 : | x |1 = 1 }.

In particular, given a normed linear space ( V, | · |) the induced norm defined on the algebra of linear endomorphisms
A : VV is given by
| A | = sup{ | A x | : | x | = 1 }.

For the three vector norms, l1, l2, and l, the corresponding matrix norms are called the L1, L2, and L norms respectively.

The L1-norm of the endomorphism A defined on the normed linear space ( V, | · |1) is the max of the l1 norms of the column vectors of A.

The L-norm of the endomorphism A defined on the normed linear space ( V, | · |) is the max of the l1 norms of the row vectors of A.

The L2-norm of the endomorphism A defined on the normed linear space ( V, | · |) is the square root of the maximum eigenvalue of ATA. This is usually too unwieldly to be of use, instead the norm | · |E defined as the square root of the sum of squares of all the elements of the matrix A. This norm is sometimes called variously the Euclidean norm or Frobenius norm of the matrix A. This norm satisifies the inequality: | Ax |2 ≤ | A |E | x |2.

The source code for evaluating the L1, E, and the L norms are given below.  The function for evaluating the L1 norm of an n × n real matrix is Matrix_L1_Norm, the function for evaluating the Euclidean norm of an n × n real matrix is Matrix_E_Norm, the function for evaluating the L norm of an n×n real matrix is Matrix_Max_Norm, the function for evaluating the L1 norm of an n × n complex matrix is CMatrix_L1_Norm, the function for evaluating the Euclidean norm of an n × n complex matrix is CMatrix_E_Norm, and the function for evaluating the L norm of an n×n complex matrix is CMatrix_Max_Norm.. There are special versions of these routines for the cases of the ubiquitous 2×2 and 3×3 matrices.

Function List

  • double Matrix_L1_Norm( double* A, int n )

    This routine calculates the L1-norm of the n×n real matrix A,
    | A | = max {| A[0][i] | + ··· + | A[n-1][i] | : 0 ≤ i < n }.

  • double Matrix_L1_Norm_2d( double* A )

    This routine calculates the L1-norm of the 2×2 real matrix A,
    | A | = max {| A[0][0] | + | A[1][0] |, | A[0][1] | + | A[1][1] | }.

  • double Matrix_L1_Norm_3d( double* A )

    This routine calculates the L1-norm of the 3×3 real matrix A,
    | A | = max {| A[0][0] | + | A[1][0] | + | A[2][0] |, | A[0][1] | + | A[1][1] | + | A[2][1] |, | A[0][2] | + | A[1][2] | + | A[2][2] | }.

  • double Matrix_E_Norm( double* A, int n )

    This routine calculates the E-norm of the n×n real matrix A,
    | A | = (| A[0][0] |² + ··· + | A[n-1][n-1] |² )½.

  • double Matrix_E_Norm_2d( double* A )

    This routine calculates the E-norm of the 2×2 real matrix A,
    | A | = (| A[0][0] |² + | A[0][1] |² + | A[1][0] |² + | A[1][1] |² )½.

  • double Matrix_E_Norm_3d( double* A )

    This routine calculates the E-norm of the 3×3 real matrix A,
    | A | = (| A[0][0] |² + | A[0][1] |² + | A[0][2] |² + ··· + | A[2][2] |² )½.

  • double Matrix_Max_Norm( double* A, int n )

    This routine calculates the max-norm of the n×n real matrix A,
    | A | = max { | A[i][0] | + ··· + | A[i][n-1] | : 0 ≤ i < n }.

  • double Matrix_Max_Norm_2d( double* A )

    This routine calculates the max-norm of the 2×2 real matrix A,
    | A | = max { | A[0][0] | + | A[0][1] |, | A[1][0] | + | A[1][1] | }.

  • double Matrix_Max_Norm_3d( double* A )

    This routine calculates the max-norm of the 3×3 real matrix A,
    | A | = max { | A[0][0] | + | A[0][1] | + | A[0][2] |, | A[1][0] | + | A[1][1] | + | A[1][2] |,
    | A[2][0] | + | A[2][1] | + | A[2][2] | }.

  • double CMatrix_L1_Norm( double complex* A, int n )

    This routine calculates the L1-norm of the n×n complex matrix A,
    | A | = max {| A[0][i] | + ··· + | A[n-1][i] | : 0 ≤ i < n }.

  • double CMatrix_L1_Norm_2d( double complex* A )

    This routine calculates the L1-norm of the 2×2 complex matrix A,
    | A | = max {| A[0][0] | + | A[1][0] |, | A[0][1] | + | A[1][1] | }.

  • double CMatrix_L1_Norm_3d( double complex* A )

    This routine calculates the L1-norm of the 3×3 complex matrix A,
    | A | = max {| A[0][0] | + | A[1][0] | + | A[2][0] |, | A[0][1] | + | A[1][1] | + | A[2][1] |, | A[0][2] | + | A[1][2] | + | A[2][2] | }.

  • double CMatrix_E_Norm( double complex* A, int n )

    This routine calculates the E-norm of the n×n complex matrix A,
    | A | = (| A[0][0] |² + ··· + | A[n-1][n-1] |² )½.

  • double CMatrix_E_Norm_2d( double complex* A )

    This routine calculates the E-norm of the 2×2 complex matrix A,
    | A | = (| A[0][0] |² + | A[0][1] |² + | A[1][0] |² + | A[1][1] |² )½.

  • double CMatrix_E_Norm_3d( double complex* A )

    This routine calculates the E-norm of the 3×3 complex matrix A,
    | A | = (| A[0][0] |² + | A[0][1] |² + | A[0][2] |² + ··· + | A[2][2] |² )½.

  • double CMatrix_Max_Norm( double complex* A, int n )

    This routine calculates the max-norm of the n×n complex matrix A,
    | A | = max { | A[i][0] | + ··· + | A[i][n-1] | : 0 ≤ i < n }.

  • double CMatrix_Max_Norm_2d( double complex* A )

    This routine calculates the max-norm of the 2×2 complex matrix A,
    | A | = max { | A[0][0] | + | A[0][1] |, | A[1][0] | + | A[1][1] | }.

  • double CMatrix_Max_Norm_3d( double complex* A )

    This routine calculates the max-norm of the 3×3 complex matrix A,
    | A | = max { | A[0][0] | + | A[0][1] | + | A[0][2] |, | A[1][0] | + | A[1][1] | + | A[1][2] |,
    | A[2][0] | + | A[2][1] | + | A[2][2] | }.

C Source Code

NASM Source Code
For Linux gcc Users

C Test Code, Test Results, and Build Shell Script

  • The file, testmatrixl1norm.c, contains a test program of Matrix_L1_Norm( ). This test program requires the file matrix_l1_norm.c listed above.

  • The file, MatrixL1NormTest.txt, contains the results of the test program testmatrixl1norm.c.

  • The file, testmatrixl1norm.sh, contains the shell script used to compile, link, and execute the test program testmatrixl1norm.c.


  • The file, testmatrixl1norm_2d.c, contains a test program of Matrix_L1_Norm_2d( ). This test program requires the file matrix_l1_norm_2d.c listed above.

  • The file, MatrixL1Norm2dTest.txt, contains the results of the test program testmatrixl1norm_2d.c.

  • The file, testmatrixl1norm_2d.sh, contains the shell script used to compile, link, and execute the test program testmatrixl1norm_2d.c.


  • The file, testmatrixl1norm_3d.c, contains a test program of Matrix_L1_Norm_3d( ). This test program requires the file matrix_l1_norm_3d.c listed above.

  • The file, MatrixL1Norm3dTest.txt, contains the results of the test program testmatrixl1norm_3d.c.

  • The file, testmatrixl1norm_3d.sh, contains the shell script used to compile, link, and execute the test program testmatrixl1norm_3d.c.


  • The file, testmatrixenorm.c, contains a test program of Matrix_E_Norm( ). This test program requires the file matrix_e_norm.c listed above.

  • The file, MatrixENormTest.txt, contains the results of the test program testmatrixenorm.c.

  • The file, testmatrixenorm.sh, contains the shell script used to compile, link, and execute the test program testmatrixenorm.c.


  • The file, testmatrixenorm_2d.c, contains a test program of Matrix_E_Norm_2d( ). This test program requires the file matrix_e_norm_2d.c listed above.

  • The file, MatrixENorm2dTest.txt, contains the results of the test program testmatrixenorm_2d.c.

  • The file, testmatrixenorm_2d.sh, contains the shell script used to compile, link, and execute the test program testmatrixenorm_2d.c.


  • The file, testmatrixenorm_3d.c, contains a test program of Matrix_E_Norm_3d( ). This test program requires the file matrix_e_norm_3d.c listed above.

  • The file, MatrixENorm3dTest.txt, contains the results of the test program testmatrixenorm_3d.c.

  • The file, testmatrixenorm_3d.sh, contains the shell script used to compile, link, and execute the test program testmatrixenorm_3d.c.


  • The file, testmatrixmaxnorm.c, contains a test program of Matrix_Max_Norm( ). This test program requires the file matrix_max_norm.c listed above.

  • The file, MatrixMaxNormTest.txt, contains the results of the test program testmatrixmaxnorm.c.

  • The file, testmatrixmaxnorm.sh, contains the shell script used to compile, link, and execute the test program testmatrixmaxnorm.c.


  • The file, testmatrixmaxnorm_2d.c, contains a test program of Matrix_Max_Norm_2d( ). This test program requires the file matrix_max_norm_2d.c listed above.

  • The file, MatrixMaxNorm2dTest.txt, contains the results of the test program testmatrixmaxnorm_2d.c.

  • The file, testmatrixmaxnorm_2d.sh, contains the shell script used to compile, link, and execute the test program testmatrixmaxnorm_2d.c.


  • The file, testmatrixmaxnorm_3d.c, contains a test program of Matrix_Max_Norm_3d( ). This test program requires the file matrix_max_norm_3d.c listed above.

  • The file, MatrixMaxNorm3dTest.txt, contains the results of the test program testmatrixmaxnorm_3d.c.

  • The file, testmatrixmaxnorm_3d.sh, contains the shell script used to compile, link, and execute the test program testmatrixmaxnorm_3d.c.


  • The file, testcmatrixl1norm.c, contains a test program of CMatrix_L1_Norm( ). This test program requires the file cmatrix_l1_norm.c listed above.

  • The file, CMatrixL1NormTest.txt, contains the results of the test program testcmatrixl1norm.c.

  • The file, testcmatrixl1norm.sh, contains the shell script used to compile, link, and execute the test program testcmatrixl1norm.c.


  • The file, testcmatrixl1norm_2d.c, contains a test program of CMatrix_L1_Norm_2d( ). This test program requires the file cmatrix_l1_norm_2d.c listed above.

  • The file, CMatrixL1Norm2dTest.txt, contains the results of the test program testcmatrixl1norm_2d.c.

  • The file, testcmatrixl1norm_2d.sh, contains the shell script used to compile, link, and execute the test program testcmatrixl1norm_2d.c.


  • The file, testcmatrixl1norm_3d.c, contains a test program of CMatrix_L1_Norm_3d( ). This test program requires the file cmatrix_l1_norm_3d.c listed above.

  • The file, CMatrixL1Norm3dTest.txt, contains the results of the test program testcmatrixl1norm_3d.c.

  • The file, testcmatrixl1norm_3d.sh, contains the shell script used to compile, link, and execute the test program testcmatrixl1norm_3d.c.


  • The file, testcmatrixenorm.c, contains a test program of CMatrix_E_Norm( ). This test program requires the file cmatrix_l2_norm.c listed above.

  • The file, CMatrixENormTest.txt, contains the results of the test program testcmatrixenorm.c.

  • The file, testcmatrixenorm.sh, contains the shell script used to compile, link, and execute the test program testcmatrixenorm.c.


  • The file, testcmatrixenorm_2d.c, contains a test program of CMatrix_E_Norm_2d( ). This test program requires the file cmatrix_l2_norm_2d.c listed above.

  • The file, CMatrixENorm2dTest.txt, contains the results of the test program testcmatrixenorm_2d.c.

  • The file, testcmatrixenorm_2d.sh, contains the shell script used to compile, link, and execute the test program testcmatrixenorm_2d.c.


  • The file, testcmatrixenorm_3d.c, contains a test program of CMatrix_E_Norm_3d( ). This test program requires the file cmatrix_e_norm_3d.c listed above.

  • The file, CMatrixENorm3dTest.txt, contains the results of the test program testcmatrixl2norm_3d.c.

  • The file, testcmatrixenorm_3d.sh, contains the shell script used to compile, link, and execute the test program testcmatrixenorm_3d.c.


  • The file, testcmatrixmaxnorm.c, contains a test program of CMatrix_Max_Norm( ). This test program requires the file cmatrix_max_norm.c listed above.

  • The file, CMatrixMaxNormTest.txt, contains the results of the test program testcmatrixmaxnorm.c.

  • The file, testcmatrixmaxnorm.sh, contains the shell script used to compile, link, and execute the test program testcmatrixmaxnorm.c.


  • The file, testcmatrixmaxnorm_2d.c, contains a test program of CMatrix_Max_Norm_2d( ). This test program requires the file cmatrix_max_norm_2d.c listed above.

  • The file, CMatrixMaxNorm2dTest.txt, contains the results of the test program testcmatrixmaxnorm_2d.c.

  • The file, testcmatrixmaxnorm_2d.sh, contains the shell script used to compile, link, and execute the test program testcmatrixmaxnorm_2d.c.


  • The file, testcmatrixmaxnorm_3d.c, contains a test program of CMatrix_Max_Norm_3d( ). This test program requires the file cmatrix_max_norm_3d.c listed above.

  • The file, CMatrixMaxNorm3dTest.txt, contains the results of the test program testcmatrixmaxnorm_3d.c.

  • The file, testcmatrixmaxnorm_3d.sh, contains the shell script used to compile, link, and execute the test program testcmatrixmaxnorm_3d.c.