Skip to main content

Solving a linear system Ax = b

Given a system of linear equations represented as a matrix equation Ax = b, use linalg.solve to find x. For larger systems, linalg.solve is numerically stable and much faster than computing inv(A) @ b.

Eigenvalue decomposition

Decompose a square matrix into its eigenvalues and eigenvectors with linalg.eig. For symmetric matrices, use linalg.eigh which is faster and guarantees real eigenvalues:

Singular Value Decomposition (SVD)

SVD factors any matrix A into U * S * V^T. This is the foundation for dimensionality reduction, pseudoinverse computation, and low-rank approximation.

Matrix inverse and pseudo-inverse


Matrix multiplication with matmul and dot

numpy-ts provides several ways to multiply matrices and vectors, each suited to different use cases.