How do you consider which element in the extended matrix is the pivot?

262 Views Asked by At

In fact, many articles said that the pivot must be the largest number in absolute value.

But in wikipedia, the case was...

$\begin{bmatrix} 0.00300 & 59.14 & 59.17\\ 5.291 & -6.130 & 46.78 \end{bmatrix}$

And it chose $5.291$ to be a pivot, so it became...

$\begin{bmatrix} 5.291 & -6.130 & 46.78\\ 0.00300 & 59.14 & 59.17 \end{bmatrix}$

Why is it not $-6.130$ nor $59.14$ when it is literally absolutely higher? Did I understand something wrong?

2

There are 2 best solutions below

0
On BEST ANSWER

In the wikipedia, they are doing partial pivoting, they pick the largest element in the first column.

After which, they move on to the second column and so on.

From the wikipedia page:

In partial pivoting, the algorithm selects the entry with largest absolute value from the column of the matrix that is currently being considered as the pivot element.

0
On

To expand on the correct answer:

There are many pivoting strategies. The best is full pivoting and searches for the highest element in the complete matrix. This is (consider very large matrices) a giant pile of work, as you have to do it every loop of the algorithm. If the matrix is of size $n\times n$, you search over $n^2$ entries in every of the $n$ iterations, adding to the total of $\mathcal{O}(n^3)$ complexity.

Other pivoting strategies just consider the largest element in the current column or row and permute this to the diagonal. This reduces the computational time needed to find this element but is not optimal.

Another approach (taught to me as rook pivoting) moves over the matrix as a chess-piece by choosing the largest element in the currently considered column, then search that row for any larger element, than the column etc.