applications of matrices and determinant