Nelson banner
Linear algebra

The Linear Algebra module provides matrix and vector computation functions in Nelson.

It includes functions for matrix factorization, decomposition, inversion, and analysis, as well as operations on eigenvalues, singular values, and subspaces.

The module includes numerical methods for evaluating matrix properties, condition numbers, and transformations used in linear algebra problems.

Linear Systems

Functions for solving, analyzing, and measuring linear systems and vector or matrix quantities.

  • cumtrapz
    Cumulative trapezoidal numerical integration.
  • del2
    Discrete Laplacian.
  • det
    Matrix determinant.
  • diff
    Differences and approximate derivatives.
  • gradient
    Numerical gradient.
  • inv
    Matrix inverse.
  • kron
    Kronecker tensor product.
  • null
    Null space of a matrix.
  • orth
    Range space of a matrix.
  • rank
    Rank of matrix.
  • rref
    Gauss-Jordan elimination.
  • subspace
    Angle between two subspaces.
  • tensorprod
    Tensor products between two arrays.
  • trace
    Matrix trace.
  • trapz
    Trapezoidal numerical integration.
  • vecnorm
    Vector-wise norm.
Decompositions

Matrix factorization and plane rotation functions.

  • chol
    Cholesky factorization.
  • hess
    Hessenberg form of a square matrix.
  • lu
    LU matrix factorization.
  • planerot
    Givens plane rotation.
  • qr
    QR matrix factorization.
Eigenvalues and Singular Values

Functions for eigenvalue, singular-value, and Schur computations.

  • balance
    Diagonal scaling to improve eigenvalue accuracy.
  • eig
    Eigenvalues and eigenvectors.
  • eigs
    Selected eigenvalues and eigenvectors of a sparse matrix.
  • rsf2csf
    Convert real Schur form to complex Schur form.
  • schur
    Schur decomposition.
  • svd
    Singular Value Decomposition.
  • svds
    Selected singular values and singular vectors of a sparse matrix.
Matrix Functions

Functions that evaluate elementary functions on matrices.

  • expm
    Computes the matrix exponential of a square matrix.
  • logm
    Computes the matrix logarithm of a square matrix.
  • pagectranspose
    Page-wise complex conjugate transpose.
  • pageinv
    Page-wise matrix inverse.
  • pagemtimes
    Page-wise matrix multiplication.
  • pagenorm
    Page-wise matrix or vector norm.
  • pagetranspose
    Page-wise transpose.
  • sqrtm
    Computes the matrix square root of a square matrix.
Matrix Properties

Functions for condition estimates, structure checks, and matrix properties.

  • bandwidth
    Lower and upper matrix bandwidth.
  • cond
    Condition number for inversion.
  • condeig
    Condition number with respect to eigenvalues.
  • condest
    1-norm condition number estimate.
  • isbanded
    Determine if matrix is within specific bandwidth.
  • ishermitian
    Computes if matrix is hermitian or skew-hermitian.
  • issymmetric
    Computes if matrix is symmetric.
  • rcond
    Inverse condition number.
Iterative Solvers

Iterative solvers for linear systems.

  • bicg
    BiConjugate gradients method for sparse linear systems.
  • bicgstab
    BiConjugate gradients stabilized method.
  • cgs
    Conjugate gradients squared method for sparse linear systems.
  • gmres
    Generalized minimum residual method.
  • lsmr
    LSMR method for sparse linear equations and least squares.
  • lsqr
    LSQR method for sparse linear equations and least squares.
  • minres
    Minimum residual method for symmetric or Hermitian sparse systems.
  • pcg
    Preconditioned conjugate gradients method.
  • qmr
    Quasi-minimal residual method for sparse linear systems.
Preconditioners

Incomplete factorization functions used as preconditioners.

  • ichol
    Incomplete Cholesky factorization.
  • ilu
    Incomplete LU factorization.