Section II, Matrix elimination

Source: Internet
Author: User

First, matrix elimination element

In solving the equations, we often use the elimination method, and the solution of the equation can be obtained by multiplying the equation and adding and reducing the equations. Since the equations can be solved by the elimination method, it is natural to use the elimination method to change the equations into matrices.

We summon a set of equations that we would first use to demonstrate the elimination method, but the equations are too cumbersome to write, so the matrix is used directly to demonstrate ~ ~

We take out its coefficient matrix.

Knowledge preparation for elimination of elements: elimination of coefficients matrix

We keep the first line of the matrix and then eliminate the extra variables for all the rows below

start with the X position first.

Now that we're going to eliminate X, we just need to be concerned with the first column of the Matrix.

As we can see in the figure, the key position is the red mark of 1 (we call this position the number "principal", because it is the first one that appears, so it is called "primary One"), and our goal is to change the position of the blue marker to 0.

The operation is simple, the first row remains the same (because it is a primary row), the second line is subtracted by the first row as a whole, and the third row does not change (because it is 0).

So we got the matrix, and we can see that the first column of the element has become 0 in addition to the first line.

then, we deal with Y.

Continue to observe the matrix

Now, 3 is the new principal (primary two), and we want to eliminate 1 of the blue position.

The operation is still simple, the first to second line is unchanged, and the third line minus-1/3 times times the second row.

Then get a matrix like this. (mark the main element)

In fact, the elimination of the coefficient matrix ends here, we get an upper triangular matrix (because it has only the number in the upper half of the triangle), we represent it with U.

By the way, the primary cannot be 0 when the elimination element, and if the primary is 0, you can swap the row that contains the primary element with the row of the primary element below it (for example, into).

By the way, the determinant value is the product of the main element, so the matrix determinant is 9

If there is no line to be exchanged, the equation has no solution, and this situation is discussed later.

The first step of eliminating the element: eliminating the element of augmented matrix

The item on the right side of the equal sign has the same action as the left side in the normal elimination process of the opposing path group, as well as in the matrix.

For the equation set, we get its coefficient matrix A: And then we put it equal to the right part B: put it in a and get a new matrix:

We call this new matrix "augmented matrix" because it adds a column to the original matrix.

For each row of the augmented matrix, we do the same as the upper coefficient matrix elimination (in other words, the column with the transformation added in the process of eliminating the coefficients matrix)

Note: Normal elimination of the direct operation of the augmented matrix can be, the above coefficient matrix alone is only to deepen the understanding of you.

Second cloth of the elimination of Yuan: the return generation

After the transformation above, the augmented matrix becomes this way:.

Change it into a equations.

Solve, get X=-1/9,Y=-4/9,Z=7/9 (WTF)

Second, the elimination of the element matrix

Above we discussed how to do matrix elimination, now, let us change a way of thinking, using matrices to represent the process of elimination.

(1) Pre-knowledge

Before we discussed the problem of matrix multiplication vectors, we concluded that the result of the matrix multiplication vector is actually a linear combination of matrix columns.

However, the matrix is used to eliminate all the rows of the matrix, then, the matrix between the rows are also similar properties? in terms of routines, I would not have asked this question without this nature.

In fact, when a vector is multiplied by a matrix, the resulting result is a linear combination of the rows of the matrix.

For example, the result is equivalent to 1*[1 1] + 2*[1-2] = [3-3].

Here is a slightly more advanced concept: multiply a matrix on the left side of a matrix A, that is, a row transformation of a, and on the right side of a matrix, is a column transformation.

(2) using matrix to eliminate the element

We still use this equation to demonstrate that the coefficient matrix A is taken out:

Do you remember our steps?

First, keep the first row unchanged, the second row as a whole minus one-fold, and the third line unchanged.

To summarize, we need to take out the first line of 1 time times, then combine it linearly with the second line (add), then the other rows will be the same (note that we subtract two lines from the matrix elimination and the "linear combination" is the sum).

As required, we only need to multiply on the left side of a (we use E1 to represent this matrix)

Why is this matrix? We look in line.

First, the first line of a does not change, so we need to take out the 1 first line of a, 0 second row, 0 third row (linear combination), and 1 0 0 make up the first line of E1.

Then we need a linear combination of the first line of 1 A, 1 second row, and 0 third row, so-1 1 0 make up the second line of E1.

The third row is unchanged, so it takes 0 first lines, 0 second rows, 1 third rows, so the third line of E1 is 0 0 1

After the transformation, we got it.

We then keep one or two rows unchanged, combining the 1/3 second row with the third line in a linear

Can you write your own matrix that requires a left multiplication? Try to deduce it yourself.

Is it your result? We use E2 to represent this matrix.

After this transformation, we get the matrix U that we want:.

Now, we can use a formula to express the whole process of elimination:

E2 (E1A) =u

Seeing here, there may be obsessive-compulsive sufferers or perfectionists who grumble: The formula is too bloated.

So

Finally, we merge the elimination steps

We want the result is similar to ea=u such clean and tidy formula, how to do it?

Here we need to introduce a new property about matrix multiplication: matrix multiplication satisfies the binding law (but does not satisfy the commutative law)

In other words, E2 (E1A) = (e2e1) A. (But Ab≠ba)

So E= (E2E1), our tube E is called the elimination matrix.

Third, permutation matrix

This is an additional content

Line Exchange

The linear combination of rows and rows is realized by the left multiplication matrix when we eliminate the element, so what do we need to do if we want to exchange the two lines?

Summon a matrix First:

Suppose we want the 12th line of the matrix (get)

For the first row of the new matrix, we are equivalent to taking out the first row of 0 original matrices, the second row of 1 original matrices, and the third row of the original matrix of 0.

For the second row of the new matrix, we are equivalent to taking out the first row of 1 original matrices, the second row of 0 original matrices, and the third row of the original matrix of 0.

For the third row of the new matrix, we are equivalent to taking out the first row of 0 original matrices, the second row of 0 original matrices, and the third row of the original matrix of 1.

Therefore, we simply multiply one on the basis of the original matrix. (The color of each line is different to make it easier to understand how it is made, no other special meaning)

The matrix of the left side of our tube is called the permutation matrix, denoted by P.

Column Exchange

As mentioned before, the left multiplication is the action row, right multiplication is the action column

Summon a matrix:

Want to swap the 12th column of this matrix, get

For the first column of the new matrix , we are equivalent to taking out 0 of the first column of the original matrix, 1 the second column of the original matrix, and the third column of the 0 original matrix.

For the second column of the new matrix, we are equivalent to the first column of 1 original matrices, the second column of the 0 original matrices, and the third column of the 0 original matrices.

for the third column of the new matrix, we are equivalent to taking out the first column of 0 original matrices, the second column of the 0 original matrices, and the third column of the 1 original matrices.

So, just right multiplication is required.

Note: Although this matrix looks the same as the permutation matrix of the swap lines above, the nature and composition are completely different (the permutation matrix of the row interchange is made up of one row, while the column Exchange is a column of one column)

Section II, Matrix elimination

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.