QR decomposition is a square matrix factorization technique.

For a given matrix A, there exists a decomposition of the form:

  • A = the input matrix of dimension n x n.
  • Q = unitary matrix
  • R = upper triangular matrix

QR-decomp is used to solve a system of linear equations and also used to find eigenvalues in the QR algorithm