6

I'm a new user of BLAS/Lapack, and I'm just wondering is there a routine which does Gaussian elimination or even Gaussian-Jordan elimination? I googled and looked at their documentations, but still couldn't find them.

Thanks a lot for helping me out!

Kelvin Lee
  • 385
  • 3
  • 15
  • Does it have to be Gaussian/Gauss-Jordan or can it be any algorithm which finds exact solutions to linear equations? – Matt Ball Aug 08 '11 at 04:20
  • 1
    @Matt Ball I think I may prefer Gaussian/Gauss-Jordan because the resulting matrix will be put in the echelon form. Will other algorithms also produce row echelon form? – Kelvin Lee Aug 08 '11 at 04:27
  • @KelvinLee Just curious, what are some other operations that row-echelon form would be helpful for? (I am just wanting to learn more, not suggesting this isn't a valid use case.) – Justin Meiners Jul 18 '22 at 23:09

1 Answers1

8

Gaussian elimination is basically the same as LU factorization. The routine xGETRF computes the LU factorization (e.g., DGETRF for real double precision matrices). The U factor corresponds to the matrix after Gaussian elimination. The U factor is stored in the upper triangular part (including the diagonal) of the matrix A on exit.

LU factorization / Gaussian elimination is commonly used to solve linear systems of equations. You can use the xGETRS routine to solve a linear system once you have computed the LU factorization.

Jitse Niesen
  • 4,492
  • 26
  • 23