matrix_function function
A function of a square matrix.
How to write it
matrix_function(f, matrix)
- f
- The function, such as exp. Takes a function.
- matrix
- A square matrix. Takes a matrix, written as a list of rows.
Examples
matrix_function(exp, [[0, 0], [0, 0]])In the solver,
Open in the solvermatrix_function(exp, [[0, 0], [0, 0]])gives[[1, 0], [0, 1]].
Related functions
- matrix_log
Logarithm of a square matrix.
- matrix_exp
Exponential of a square matrix.
- matrix_power
A square matrix to a whole power.
- identity_matrix
Identity matrix of a given size.
- hilbert_matrix
Hilbert matrix of a given size: the entry in row i and column j is 1/(i + j - 1).
- diagonal_matrix
A matrix with the given list on its diagonal and zeros elsewhere.