LA2-Elimination-with-Matrices

Gaussian Elimination

  1. Elimination: Success or Failure: 尝试用“消元法”把线性方程组变成一个“上三角矩阵”(即对角线以下全是0)。如果可以成功消元,说明方程可以变成上三角形式;如果消元失败,说明方程组无解或者有无穷多解。

  2. Back substitution:用已得到的上三角矩阵,从最后一行向上一个一个回代,可以分别求出z,y,x.

  3. Elimination matrices:消元矩阵,可以用第一行消去第二行的某个元素。比如第二行减去第一行的某倍数。

  4. Matrix multiplication:矩阵乘法。

Elimination & gain correct pivots

In the matrix A, the top left element 1 is named the first pivot. Then to process the matrix.

For example, how to calculate the second row? Because the first row is [1 2 1] and the second is [3 8 1], so to eliminate the 1st element of the 2nd row, to make 2nd row minus 3 times first row, that’s [3-31 8-32 1-3*1] to gain [0 2 -2].

Now the second pivot is the middle element in the matrix 2.

So now all pivots is [1 2 5]. Pivots cannot be 0.

为什么不接受pivot是0

因为下一行=下一行 - (该行系数/pivot) * 当前行,因此才可以一个一个消元。所以要求pivot不可为0.

所以,如何解决?

  1. 换行
  2. 失败

if pivot is zero

If the 1st element is 0 of the matrix, would we say that we fail? No, we dont accept zero as the pivot. So we exchange the rows.

For example, in this case, we will gain total Zeros in third row, which means not able to be invertible (next wk).

Back-substitution

Augment the matrix. Augment means tack something on.

Change

to

The [2 12 2] (vertical) is the extra column.

According the same elimination rules in step 1, so the original matrix should be:

So easily gain


Matrices:

Here I am not sure if there are addition signals, because there should be a matrix, but professor wrote addition signals here.

Matrices: subtract 3*row1 from row2

What matrix would do it? Note Matrices: subtract 3 row1 from row2

Step2: Subtract 2 * row2 from row3

Associative Property of Multiplication of matrices

Permutation: Exchange rows 1 and 2

There are horizontal rows above, but how to deal with columns?

Permutation: Exchange columns 1 and 2

Notice the location of [0 1, 1 0], the different location leads to the contrary results.

Inverses

Which matrix made the other matrix into an indentity?

注意,不是每一个矩阵都能找到一个逆矩阵(inverse matrix),相乘得到单位矩阵(Identity)


Welcome to point out the mistakes and faults!

Related Issues not found

Please contact @SenRanja to initialize the comment