1

How is QR decomposition implemented in Math.NET Numerics?

Is it with Gram-Schimdt or with Givens rotations? I have a feeling that it is implemented with Gram-Schimdt, but I'm not sure. I can't find the implementation.

Is QR decomposition with Gram-Schimdt different from with Givens rotations, in terms of results?

I generated (manually) a QR decomposition using Givens rotations for a matrix, and then generated a QR decomposition usingMathNet.Numerics.LinearAlgebra.Generic.Factorization.QRMethod (which I believe implements Gram-Schimdt) and the results were slightly different. The difference between numbers is about 1E-16 (not that big), and some rows have the opposite sign (*-1) (this is the real problem - I think this happens because MathNet.Numerics implements a different QR algorithm).

Can you suggest some libraries that perform QR decomposition using Givens rotations?

Mark Pattison
  • 2,964
  • 1
  • 22
  • 42
Stefan P.
  • 331
  • 6
  • 23

1 Answers1

0

According to the documentation, it is implemented using Householder reflections:

The computation of the QR decomposition is done at construction time by Householder transformation.

Different methods can produce answers with small numerical differences or with negative rows, as you describe. See the Wikipedia article for more information.

Mark Pattison
  • 2,964
  • 1
  • 22
  • 42