torch.linalg¶
Common linear algebra operations.
See Linear algebra (torch.linalg) for some common numerical edgecases.
Matrix Properties¶
Computes a vector or matrix norm. 

Computes a vector norm. 

Computes a matrix norm. 

Alias for 

Computes the determinant of a square matrix. 

Computes the sign and natural logarithm of the absolute value of the determinant of a square matrix. 

Computes the condition number of a matrix with respect to a matrix norm. 

Computes the numerical rank of a matrix. 
Decompositions¶
Computes the Cholesky decomposition of a complex Hermitian or real symmetric positivedefinite matrix. 

Computes the QR decomposition of a matrix. 

Computes the LU decomposition with partial pivoting of a matrix. 

Computes a compact representation of the LU factorization with partial pivoting of a matrix. 

Computes the eigenvalue decomposition of a square matrix if it exists. 

Computes the eigenvalues of a square matrix. 

Computes the eigenvalue decomposition of a complex Hermitian or real symmetric matrix. 

Computes the eigenvalues of a complex Hermitian or real symmetric matrix. 

Computes the singular value decomposition (SVD) of a matrix. 

Computes the singular values of a matrix. 
Solvers¶
Computes the solution of a square system of linear equations with a unique solution. 

Computes the solution of a triangular system of linear equations with a unique solution. 

Computes the solution of a square system of linear equations with a unique solution given an LU decomposition. 

Computes a solution to the least squares problem of a system of linear equations. 
Inverses¶
Computes the inverse of a square matrix if it exists. 

Computes the pseudoinverse (MoorePenrose inverse) of a matrix. 
Matrix Functions¶
Computes the matrix exponential of a square matrix. 

Computes the nth power of a square matrix for an integer n. 
Matrix Products¶
Computes the cross product of two 3dimensional vectors. 

Alias for 

Computes the dot product of two batches of vectors along a dimension. 

Efficiently multiplies two or more matrices by reordering the multiplications so that the fewest arithmetic operations are performed. 

Computes the first n columns of a product of Householder matrices. 
Tensor Operations¶
Computes the multiplicative inverse of 

Computes the solution X to the system torch.tensordot(A, X) = B. 
Experimental Functions¶
Computes the Cholesky decomposition of a complex Hermitian or real symmetric positivedefinite matrix. 

Computes the inverse of a square matrix if it is invertible. 

A version of 

This is a version of 

Computes a compact representation of the LDL factorization of a Hermitian or symmetric (possibly indefinite) matrix. 

This is a version of 

Computes the solution of a system of linear equations using the LDL factorization. 