Properties & Matrix Functions
Compute the inverse of a matrix.
Compute the Moore-Penrose pseudo-inverse.
Construct a block-diagonal matrix from provided square matrices.
Create a circulant matrix from a vector.
Create a companion matrix from polynomial coefficients.
Compute the matrix exponential exp(A).
Create a Hadamard matrix of order n.
Create a Hankel matrix from first column and optional last row.
Create a Hilbert matrix of size n.
Compute the Kronecker product of two matrices.
Compute the matrix logarithm log(A).
Raise a square matrix to an integer power.
Compute the matrix square root sqrt(A).
Create a Toeplitz matrix from first column and optional first row.
Create a Vandermonde matrix.
Condition number of a matrix.
norm is exported by deepbox/linalg.
Compute the determinant of a matrix.
Compute the rank of a matrix.
Compute sign and natural logarithm of the determinant.
Compute the trace of a matrix.
import { cond, expm, hadamard, inv, matrix_power, norm, trace } from "deepbox/linalg";import { tensor } from "deepbox/ndarray";const a = tensor([[2, 0], [0, 3]]);console.log(inv(a).toString());console.log(norm(a));console.log(trace(a));console.log(cond(a));console.log(matrix_power(a, 3).toString());console.log(expm(a).toString());console.log(hadamard(4).toString());