Linear Algebra

hermitian(A)

Returns the Hermitian transpose of a matrix

AH_v(A, v)

Returns \(A^H v\) for a given matrix A and a vector v

Triangular Systems

solve_Lx_b(L, b)

Solves the system L x = b using back substitution

solve_LTx_b(L, b)

Solves the system L^T x = b using back substitution

solve_Ux_b(U, b)

Solves the system U x = b using back substitution

solve_UTx_b(U, b)

Solves the system U^T x = b using back substitution

solve_spd_chol(L, b)

Solves a symmetric positive definite system A x = b where A = L L’

Fundamental Subspaces

orth(A[, rcond])

Constructs an orthonormal basis for the range of A using SVD

row_space(A[, rcond])

Constructs an orthonormal basis for the row space of A using SVD

null_space(A[, rcond])

Constructs an orthonormal basis for the null space of A using SVD

left_null_space(A[, rcond])

Constructs an orthonormal basis for the left null space of A using SVD

Singular Value Decomposition

effective_rank(A[, rcond])

Returns the effective rank of A based on its singular value decomposition

effective_rank_from_svd(u, s, vh[, rcond])

Returns the effective rank of a matrix from its SVD

singular_values(A)

Returns the singular values of a matrix

Subspaces

project_to_subspace(U, v)

Projects a vector to a subspace

is_in_subspace(U, v)

Checks whether a vector v is in the subspace spanned by an ONB U or not

principal_angles_cos(A, B)

Returns the cosines of principal angles between two subspaces

principal_angles_rad(A, B)

Returns the principal angles between two subspaces in radians

principal_angles_deg(A, B)

Returns the principal angles between two subspaces in degrees

smallest_principal_angle_cos(A, B)

Returns the cosine of smallest principal angle between two subspaces

smallest_principal_angle_rad(A, B)

Returns the smallest principal angle between two subspaces in radians

smallest_principal_angle_deg(A, B)

Returns the smallest principal angle between two subspaces in degrees

smallest_principal_angles_cos(subspaces)

Returns the smallest principal angles between each pair of subspaces

smallest_principal_angles_rad(subspaces)

Returns the smallest principal angles between each pair of subspaces in radians

smallest_principal_angles_deg(subspaces)

Returns the smallest principal angles between each pair of subspaces in degrees

subspace_distance(A, B)

Returns the Grassmannian distance between two subspaces