torch.ormqr(input, tau, other, left=True, transpose=False, *, out=None) Tensor

Computes the matrix-matrix multiplication of a product of Householder matrices with a general matrix.

Multiplies a m×nm \times n matrix C (given by other) with a matrix Q, where Q is represented using Householder reflectors (input, tau). See Representation of Orthogonal or Unitary Matrices for further details.

If left is True then op(Q) times C is computed, otherwise the result is C times op(Q). When left is True, the implicit matrix Q has size m×mm \times m. It has size n×nn \times n otherwise. If transpose is True then op is the conjugate transpose operation, otherwise it’s a no-op.

Supports inputs of float, double, cfloat and cdouble dtypes. Also supports batched inputs, and, if the input is batched, the output is batched with the same dimensions.

See also

torch.geqrf() can be used to form the Householder representation (input, tau) of matrix Q from the QR decomposition.

  • input (Tensor) – tensor of shape (*, mn, k) where * is zero or more batch dimensions and mn equals to m or n depending on the left.

  • tau (Tensor) – tensor of shape (*, min(mn, k)) where * is zero or more batch dimensions.

  • other (Tensor) – tensor of shape (*, m, n) where * is zero or more batch dimensions.

  • left (bool) – controls the order of multiplication.

  • transpose (bool) – controls whether the matrix Q is conjugate transposed or not.

Keyword Arguments:

out (Tensor, optional) – the output Tensor. Ignored if None. Default: None.


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources