Introduction to the algorithm note 28th Chapter matrix Operations

Source: Internet
Author: User

28.1 solving a linear equation group definition

Singular matrix: a matrix with rank not full rank

(linear equations): the rank of matrix vector A of a linear equation group is less than n

Over-set (linear equations): The number of equations exceeds the number of unknown variables n

In fact, I have forgotten almost. = Pick it up quickly

Lup Analysis

Find three nxn matrices L, U, and P to meet

Pa=lu

What's the relationship with program assignment?

where L (lower) is the lower triangular matrix, U (upper) is the upper triangular matrix and P is a permutation matrix. We call the Lup decomposition of the matrix Lup, which satisfies the upper formula, called a.

There is such decomposition for all non-singular matrices. In the following pseudo code the transpose matrix is represented by the array π.

Calculate an LU decomposition

Considering the non-singular nxn matrix A, the Gaussian elimination method is used to create a LU decomposition.

Use recursive return to dissolve

This is called a for A11 's shure (really nasty =. =

In Lup decomposition, the element we are removing is called the principal element, for the diagonal of the matrix U, in order to avoid the 0 as a divisor, we include a transpose matrix p in the Lup decomposition, so the operation is called the Select Principal element.

Here's the code that uses iterations instead of tail recursion:

Run time is cubic

Calculate a Lup decomposition

And Lu decomposition is similar

Introduction to the algorithm note 28th Chapter matrix Operations

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.