Functions > Vector and Matrix > Array Characteristics > Example: Matrix Norm and Determinant Functions
  
Example: Matrix Norm and Determinant Functions
1. Define a square matrix.
Click to copy this expression
2. Set the matrix elements to generic variable names.
Click to copy this expression
3. Use the norm1 function to find the L1 norm of matrix M.
Click to copy this expression
Alternatively, find the L1 norm by calculating the maximum of the absolute column sums of M.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
4. Use the norm2 function to find the L2 norm of matrix M.
Click to copy this expression
Alternatively, use the svds function to find the largest absolute singular value of matrix M.
Click to copy this expression
The svds function returns a vector of sorted singular values, so the top value is the largest singular value of matrix M.
5. Use the norme function to find the Euclidean norm of matrix M.
Click to copy this expression
Alternatively, manually calculate the square root of the sum of the absolute squares of matrix M.
Click to copy this expression
6. Use the normi function to find the Infinity norm of matrix M.
Click to copy this expression
Alternatively, use the max function to manually calculate the maximum of the absolute row sums of matrix M.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
7. Use the det function to find the determinant of matrix M.
Click to copy this expression
Alternatively, manually calculate the determinant of matrix M.
Click to copy this expression
8. Use the norm function to find the norm of a vector containing the elements of column 0 of matrix M.
Click to copy this expression
Click to copy this expression
Alternatively, manually calculate the norm of vector v.
Click to copy this expression