What's the use of interchanging two rows when solving a matrix?

  • Thread starter Juwane
  • Start date
  • Tags
    Matrix
In summary, this method of interchanging two rows in a matrix is useful in cases where it is easier to solve the system of linear equations in matrix form.
  • #1
Juwane
87
0
Interchanging two rows would just mean to exchange places of two equations in a system. What's the use of this when no operation has been done on them, only their places have been changed? Is it done only in matrices, just so as to make the operations on the rows easier?
 
Physics news on Phys.org
  • #2
It depends what you mean by "solving" a matrix. For example, if you're calculating the determinant, then it's useful to know what relates elementary row/column operations to the value of the determinant, since after applying them, the determinant may be easier to solve.
 
  • #3
radou said:
It depends what you mean by "solving" a matrix. For example, if you're calculating the determinant, then it's useful to know what relates elementary row/column operations to the value of the determinant, since after applying them, the determinant may be easier to solve.

By solving a matrix, I mean applying elementary row operations on a matrix to solve system of linear equations, such as in the Gaussian elimination method.

I understand that multiplying an equation with a non-zero constant and/or then adding it to or subtracting it from another equation will help us eliminate the unknowns, but how does interchanging the places of any two equations help us in this?
 
  • #4
It depends on the matrix you are trying to bring to cannonic form. If it's easier for you to normalize the third row before the first row, then you would like to bring the third row up, which row interchanging allows you.

F.e. a pretty trivial matrix:

[0 1]
[1 0]

You can start adding and substracting rows from each other,
But wouldn't it be easier to just switch them?

(Of course this an idiotic example, but I hope you get it)
 
  • #5
Yes, this is what I'm asking. If we have a system of linear equations like:

[tex]2x + 3y = 8[/tex]
[tex]4x - 7y = 3
[/tex]

--then if we write the above as:

[tex]4x - 7y = 3[/tex]
[tex]2x + 3y = 8[/tex]

How will this help us in anything? I mean, the whole business of interchanging rows is useful in matrices only, and not when we don't have the equations in matrix form, right?
 
  • #6
Imagine you have a 3x3 matrix

-3 2 4
0 0 -3
0 -3 0

Ok find the determinant...

...If you took more than 10 seconds to find the determinant then you probably don't know linear algebra...

my solution ... R2<->R3 factor out a -3(3) and notice matrix is triangular. It follows that det A is (3)(-3)(1)(1)(1)=-27and remember that you swapped two rows so the sign of the determinant must change. So det A is 27. Expansion by cofactors would have taken a while. Remembering some simple theorems for understanding the effects of row operations on determinants saves time.
 
Last edited:
  • #7
Griffel has an interesting example in Linear Algebra and its Applications (1989), Vol. 1, § 4.1, p. 119.

0.01x + 10y = 10
0.1x -0.1y = 0

The answer is x = y = 0.999000999. But working correct to 3 significant figures, and rounding 100.1 to 100 in the first step:

[tex] \begin{bmatrix} 0.01 & 10 & 10\\ 0.1 & -0.1 & 0 \end{bmatrix} \rightarrow\begin{bmatrix} 0.01 & 10 & 10\\ 0 & -100 & -100 \end{bmatrix} \rightarrow\begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 1 \end{bmatrix}[/tex]

x = 0
y = 1

An error of 100%! But if we swap rows to bring the largest element in the relevant column into pivot position, to avoid the problem of having a small pivot, and again round to 3 significant figures where more appear:

[tex]\begin{bmatrix}0.1 & -0.1 & 0\\ 0.01 & 10 & 10\end{bmatrix} \rightarrow\begin{bmatrix}1 & -1 & 0\\ 0 & 999 & 1000\end{bmatrix} \rightarrow\begin{bmatrix}1 & 0 & 1\\ 0 & 1 & 1\end{bmatrix}[/tex]

x = y = 1

This method he calls partial pivoting. He says there's also a more accurate but more complicated technique called complete pivoting where the columns are exchanged. But he says partial pivoting is "nearly always used in practice." And that's all I know about that...
 

Related to What's the use of interchanging two rows when solving a matrix?

1. Why do we need to interchange two rows in matrix solving?

Interchanging two rows in matrix solving can be helpful in simplifying the matrix and making it easier to solve. It can also help in identifying patterns and finding the most efficient way to solve the matrix.

2. Can we interchange any two rows in a matrix?

Yes, we can interchange any two rows in a matrix as long as the total number of rows remains the same. However, it is important to note that this process may not always result in a simpler matrix, so it is important to use this technique judiciously.

3. How does interchanging two rows affect the solution of a matrix?

Interchanging two rows in a matrix does not change the solution of the matrix. It simply rearranges the rows and makes the matrix easier to solve. The final solution will be the same regardless of the order of the rows.

4. Are there any limitations to interchanging rows in matrix solving?

There are no specific limitations to interchanging rows in matrix solving. However, as mentioned earlier, it is important to use this technique thoughtfully as it may not always result in a simpler matrix and can sometimes complicate the solving process.

5. Is interchanging rows the only way to simplify a matrix?

No, interchanging rows is not the only way to simplify a matrix. Other techniques such as row operations, Gaussian elimination, and pivoting can also be used to simplify a matrix and make it easier to solve. The choice of technique depends on the specific matrix and the desired outcome.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
25
Views
1K
  • Linear and Abstract Algebra
Replies
3
Views
2K
  • Linear and Abstract Algebra
Replies
15
Views
4K
  • Linear and Abstract Algebra
Replies
9
Views
4K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
963
  • Linear and Abstract Algebra
Replies
1
Views
848
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Linear and Abstract Algebra
Replies
6
Views
1K
  • Linear and Abstract Algebra
Replies
4
Views
7K
Back
Top