Find the trace, rank, generalized inverse, norms, and condition numbers of a square matrix.
The Trace, Rank and Generalized Inverse of a Matrix
1. Use the tr function to find the trace, or the sum of the diagonal elements, of M.
2. Use the rank function to find the rank of the real-valued matrix M.
3. Use the geninv function to find the generalized inverse of matrix M.
The different Norms of a Matrix
1. Find the L1 norm of M, and compare the result with the output of function norm1
The L1 norm is the maximum of the absolute column sums (max taken over j= 0, 1, 2).
2. Use the norm2 function to find the L2 norm of M.
3. Use the norme function to find the Euclidean norm of M:
The Euclidean norm for a matrix is analogous to that for a vector:
4. Find the Infinity norm of M, and compare the result with the output of function normi.
The Infinity norm is the maximum of the absolute row sums (max taken over i=0, 1, 2)
The Different Condition Numbers of a Matrix
The Condition number of a matrix is the product of two matrix norms. It measures the sensitivity of a linear system solution to errors in the input vector:
1. Use the cond1 function to find the L1 condition number of M.
2. Use the cond2 function to find the L2 condition number of M.
3. Use the conde function to find the Euclidean condition number of M.
4. Use the condi function to find the Infinity condition number of M.