# tensorplay.functional.geqrf Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.geqrf.html ```python tensorplay.functional.geqrf(input, *, out=None) ``` This is a low-level function for calling LAPACK’s geqrf directly. This function returns a namedtuple (a, tau) as defined in [LAPACK documentation for geqrf](http://www.netlib.org/lapack/explore-html/df/dc5/group__variants_g_ecomputational_ga3766ea903391b5cf9008132f7440ec7b.html) . Computes a QR decomposition of input. Both Q and R matrices are stored in the same output tensor a. The elements of R are stored on and above the diagonal. Elementary reflectors (or Householder vectors) implicitly defining matrix Q are stored below the diagonal. The results of this function can be used together with [tensorplay.linalg.householder_product()](/docs/generated/tensorplay.linalg.householder_product.html#tensorplay.linalg.householder_product) to obtain the Q matrix or with tensorplay.ormqr(), which uses an implicit representation of the Q matrix, for an efficient matrix-matrix multiplication. See [LAPACK documentation for geqrf](http://www.netlib.org/lapack/explore-html/df/dc5/group__variants_g_ecomputational_ga3766ea903391b5cf9008132f7440ec7b.html) for further details. > **Note** > > See also tensorplay.linalg.qr(), which computes Q and R matrices, and tensorplay.linalg.lstsq() with the driver="gels" option for a function that can solve matrix equations using a QR decomposition. Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input matrix Keyword Arguments: out ([tuple](https://docs.python.org/3/builtins/stdtypes.html#tuple), optional) – the output tuple of (Tensor, Tensor). Ignored if None. Default: None.