Gaussian elimination with partial pivoting doubts

195 Views Asked by At

I have the following doubts about Gauss algorithm with partial pivoting:

  1. Say that I sum to the second row the first row multiplied by $k$. In the $L$ matrix, should I sum to the second row the first row multiplied for $k$ or $-k$?
  2. The $P$ matrix contains all row swaps, so for example if I swap the second row with the first one, it will contain the identity matrix with the first and second row swapped. Can I swap rows only before starting the algorithm of also in the middle of it( when I already started pivoting)? And if yes, when I swap two rows, should I perform the swap also on the $L$ matrix?
1

There are 1 best solutions below

8
On BEST ANSWER

In the first it should be $-k$ and the swapping of rows is possible while the algorithm is running, you have to swap some parts of the rows in $L$.