当前位置:网站首页>Solutions of n-ary linear equations and their criteria
Solutions of n-ary linear equations and their criteria
2022-07-03 11:04:00 【hflag168】
Determinant application -- Clem's law
1. introduce
example 1. Solve a system of linear equations :
{ x 1 + 3 x 2 + x 3 = 2 3 x 1 + 4 x 2 + 2 x 3 = 9 − x 1 − 5 x 2 + 4 x 3 = 10 2 x 1 + 7 x 2 + x 3 = 1 \begin{cases} x_1+3x_2+x_3=2 \\ 3x_1+4x_2+2x_3=9 \\ -x_1-5x_2+4x_3=10\\ 2x_1+7x_2+x_3=1 \end{cases} ⎩⎪⎪⎪⎨⎪⎪⎪⎧x1+3x2+x3=23x1+4x2+2x3=9−x1−5x2+4x3=102x1+7x2+x3=1
Explain :
{ x 1 + 3 x 2 + x 3 = 2 3 x 1 + 4 x 2 + 2 x 3 = 9 − x 1 − 5 x 2 + 4 x 3 = 10 2 x 1 + 7 x 2 + x 3 = 1 \begin{cases}x_1+3x_2+x_3=2 \\3x_1+4x_2+2x_3=9 \\-x_1-5x_2+4x_3=10\\2x_1+7x_2+x_3=1\end{cases} ⎩⎪⎪⎪⎨⎪⎪⎪⎧x1+3x2+x3=23x1+4x2+2x3=9−x1−5x2+4x3=102x1+7x2+x3=1 * eliminate Go to 2 , 3 , 4 Of x 1 \stackrel{ elimination 2,3,4 Of x_1 }\longrightarrow * eliminate Go to 2,3,4 Of x1 { x 1 + 3 x 2 + x 3 = 2 0 − 5 x 2 − x 3 = 3 0 − 2 x 2 + 5 x 3 = 12 0 + x 2 − x 3 = − 3 \begin{cases}x_1+3x_2+x_3=2 \\0 -5x_2-x_3=3 \\0-2x_2+5x_3=12\\0+x_2-x_3 = -3\end{cases} ⎩⎪⎪⎪⎨⎪⎪⎪⎧x1+3x2+x3=20−5x2−x3=30−2x2+5x3=120+x2−x3=−3 * ( 2 , 4 ) \stackrel{(2,4) }\longrightarrow *(2,4) { x 1 + 3 x 2 + x 3 = 2 0 + x 2 − x 3 = − 3 0 − 2 x 2 + 5 x 3 = 12 0 − 5 x 2 − x 3 = 3 \begin{cases}x_1+3x_2+x_3=2 \\0+x_2-x_3=-3 \\0-2x_2+5x_3=12\\0-5x_2-x_3=3\end{cases} ⎩⎪⎪⎪⎨⎪⎪⎪⎧x1+3x2+x3=20+x2−x3=−30−2x2+5x3=120−5x2−x3=3 * eliminate Go to 3 , 4 Of x 2 \stackrel{ elimination 3,4 Of x_2 }\longrightarrow * eliminate Go to 3,4 Of x2 { x 1 + 3 x 2 + x 3 = 2 0 + x 2 − x 3 = − 3 0 + 0 + 3 x 3 = 6 0 + 0 − 6 x 3 = − 12 \begin{cases}x_1+3x_2+x_3=2 \\0+x_2-x_3=-3 \\0+0+3x_3=6 \\0+0-6x_3=-12\end{cases} ⎩⎪⎪⎪⎨⎪⎪⎪⎧x1+3x2+x3=20+x2−x3=−30+0+3x3=60+0−6x3=−12 * eliminate Go to 4 Of x 3 \stackrel{ elimination 4 Of x_3 }\longrightarrow * eliminate Go to 4 Of x3 { x 1 + 3 x 2 + x 3 = 2 0 + x 2 − x 3 = − 3 0 + 0 + 3 x 3 = 6 0 + 0 + 0 = 0 \begin{cases}x_1+3x_2+x_3=2 \\0+x_2-x_3=-3 \\0+0+3x_3=6 \\0+0+0=0\end{cases} ⎩⎪⎪⎪⎨⎪⎪⎪⎧x1+3x2+x3=20+x2−x3=−30+0+3x3=60+0+0=0
analysis : The above process of solving equations , Only coefficients and constant terms are changing , and x 1 , x 2 , x 3 x_1,x_2,x_3 x1,x2,x3 It only plays a role of occupying space , Therefore, we can form a matrix with constant terms and coefficients according to their invariable positions , Thus, the solution of the equation is transformed into a simpler matrix operation .
( 1 3 1 2 3 4 2 9 − 1 − 5 4 10 2 7 1 1 ) \begin{pmatrix}1 & 3 & 1 & 2 \\3 & 4 & 2 & 9 \\-1 & -5 & 4 & 10 \\2 & 7 & 1 & 1\end{pmatrix} ⎝⎜⎜⎛13−1234−57124129101⎠⎟⎟⎞ * eliminate Go to 2 , 3 , 4 Of x 1 \stackrel{ elimination 2,3,4 Of x_1 }\longrightarrow * eliminate Go to 2,3,4 Of x1 ( 1 3 1 2 0 − 5 − 1 3 0 − 2 5 12 0 1 − 1 − 3 ) \begin{pmatrix}1 & 3 & 1 & 2 \\0 & -5 & -1 & 3 \\0 & -2 & 5 & 12 \\0 & 1 & -1 & -3\end{pmatrix} ⎝⎜⎜⎛10003−5−211−15−12312−3⎠⎟⎟⎞ * ( 2 , 4 ) \stackrel{(2,4) }\longrightarrow *(2,4) ( 1 3 1 2 0 1 − 1 − 3 0 − 2 5 12 0 − 5 − 1 3 ) \begin{pmatrix}1 & 3 & 1 & 2 \\0 & 1 & -1 & -3 \\0 & -2 & 5 & 12 \\0 & -5 & -1 & 3\end{pmatrix} ⎝⎜⎜⎛100031−2−51−15−12−3123⎠⎟⎟⎞ * eliminate Go to 3 , 4 Of x 2 \stackrel{ elimination 3,4 Of x_2 }\longrightarrow * eliminate Go to 3,4 Of x2 ( 1 3 1 2 0 1 − 1 − 3 0 0 3 6 0 0 − 6 − 12 ) \begin{pmatrix}1 & 3 & 1 & 2 \\0 & 1 & -1 & -3 \\0 & 0 & 3 & 6 \\0 & 0 & -6 & -12\end{pmatrix} ⎝⎜⎜⎛100031001−13−62−36−12⎠⎟⎟⎞ * eliminate Go to 4 Of x 3 \stackrel{ elimination 4 Of x_3 }\longrightarrow * eliminate Go to 4 Of x3 ( 1 3 1 2 0 1 − 1 − 3 0 0 3 6 0 0 0 0 ) \begin{pmatrix}1 & 3 & 1 & 2 \\0 & 1 & -1 & -3 \\0 & 0 & 3 & 6 \\0 & 0 & 0 & 0\end{pmatrix} ⎝⎜⎜⎛100031001−1302−360⎠⎟⎟⎞
A matrix consisting of coefficients and constant terms of the system of equations is called Augmented matrix . The augmented matrix in this example is as follows :
( 1 3 1 2 3 4 2 9 − 1 − 5 4 10 2 7 1 1 ) \begin{pmatrix}1 & 3 & 1 & 2 \\3 & 4 & 2 & 9 \\-1 & -5 & 4 & 10 \\2 & 7 & 1 & 1\end{pmatrix} ⎝⎜⎜⎛13−1234−57124129101⎠⎟⎟⎞
After a series of elimination , Finally, we get a matrix that looks like a ladder , It's called Ladder matrix , As shown below :
( 1 3 1 2 0 1 − 1 − 3 0 0 3 6 0 0 0 0 ) \begin{pmatrix}1 & 3 & 1 & 2 \\0 & 1 & -1 & -3 \\0 & 0 & 3 & 6 \\0 & 0 & 0 & 0\end{pmatrix} ⎝⎜⎜⎛100031001−1302−360⎠⎟⎟⎞
At this point, the solution of the equations can be obtained . that Ladder matrix It has the following characteristics :
- 0 That's ok ( All elements are 0) Below ;
- Principal component ( First non 0 element ) The column index of strictly increases with the increase of row index .
Carefully implement the process of elimination method , The corresponding matrix performs the following operations :
- Add multiples of one line to another ;
- Two lines swap ;
- Multiply a line by a non-zero number .
The above operation on the augmented matrix of equations is called " Elementary row transformation of matrix "( Explain later ), in other words , The equations obtained by the elementary row transformation of the matrix and the original equations are the same solution equations ! In this way, we can use matrix to solve linear equations :
- Write the augmented matrix of the system of equations ;
- The step matrix is obtained by elementary row transformation of the augmented matrix ;
- According to the step matrix, the solution of the equations is obtained .
Then according to the example 1 The matrix elimination method demonstrated in solves the following equation , So that we can further understand the solution of linear equations .
example 2. Solve equations :
{ x 1 − x 2 + x 3 = 1 x 1 − x 2 − x 3 = 3 2 x 1 − 2 x 2 − x 3 = 3 \begin{cases} x_1-x_2+x_3 = 1 \\ x_1-x_2 -x_3 = 3 \\ 2x_1-2x_2-x_3 = 3 \end{cases} ⎩⎪⎨⎪⎧x1−x2+x3=1x1−x2−x3=32x1−2x2−x3=3
Explain :
( 1 − 1 1 1 1 − 1 − 1 3 2 − 2 − 1 3 ) \begin{pmatrix}1 & -1 & 1 & 1 \\1 & -1 & -1 & 3 \\2 & -2 & -1 & 3 \\\end{pmatrix} ⎝⎛112−1−1−21−1−1133⎠⎞ * eliminate Go to 2 , 3 Of x 1 \stackrel{ elimination 2,3 Of x_1 }\longrightarrow * eliminate Go to 2,3 Of x1 ( 1 − 1 1 1 0 0 − 2 2 0 0 − 3 1 ) \begin{pmatrix}1 & -1 & 1 & 1 \\0 & 0 & -2 & 2 \\0 & 0 & -3 & 1 \\\end{pmatrix} ⎝⎛100−1001−2−3121⎠⎞ * c 2 × ( − 1 2 ) \stackrel{c_2\times(-\frac{1}{2}) }\longrightarrow *c2×(−21) ( 1 − 1 1 1 0 0 1 − 1 0 0 − 3 1 ) \begin{pmatrix}1 & -1 & 1 & 1 \\0 & 0 & 1 & -1 \\0 & 0 & -3 & 1 \\\end{pmatrix} ⎝⎛100−10011−31−11⎠⎞ * eliminate Go to 3 Of x 3 \stackrel{ elimination 3 Of x_3 }\longrightarrow * eliminate Go to 3 Of x3 ( 1 − 1 1 1 0 0 1 − 1 0 0 0 − 2 ) \begin{pmatrix}1 & -1 & 1 & 1 \\0 & 0 & 1 & -1 \\0 & 0 & 0 & -2\end{pmatrix} ⎝⎛100−1001101−1−2⎠⎞
Write the equations corresponding to the ladder matrix obtained above as follows :
{ x 1 − x 2 + x 3 = 1 0 + 0 + x 3 = − 1 0 + 0 + 0 = − 2 \begin{cases} x_1-x_2+x_3=1 \\ 0 + 0 +x_3 = -1 \\ 0 + 0 + 0 = -2 \end{cases} ⎩⎪⎨⎪⎧x1−x2+x3=10+0+x3=−10+0+0=−2
In the above equations , There is an equation called : 0 = d ( Not 0 ) 0 = d( Not 0) 0=d( Not 0) . Therefore, the equations have no solution .
example 3. Solve equations :
{ x 1 − x 2 + x 3 = 1 x 1 − x 2 − x 3 = 3 2 x 1 − 2 x 2 − x 3 = 5 \begin{cases} x_1-x_2+x_3 = 1 \\ x_1-x_2 -x_3 = 3 \\ 2x_1-2x_2-x_3 = 5 \end{cases} ⎩⎪⎨⎪⎧x1−x2+x3=1x1−x2−x3=32x1−2x2−x3=5
Explain :
( 1 − 1 1 1 1 − 1 − 1 3 2 − 2 − 1 5 ) \begin{pmatrix}1 & -1 & 1 & 1 \\1 & -1 & -1 & 3 \\2 & -2 & -1 & 5 \\\end{pmatrix} ⎝⎛112−1−1−21−1−1135⎠⎞ * eliminate Go to 2 , 3 Of x 1 \stackrel{ elimination 2,3 Of x_1 }\longrightarrow * eliminate Go to 2,3 Of x1 ( 1 − 1 1 1 0 0 − 2 2 0 0 − 3 3 ) \begin{pmatrix}1 & -1 & 1 & 1 \\0 & 0 & -2 & 2 \\0 & 0 & -3 & 3 \\\end{pmatrix} ⎝⎛100−1001−2−3123⎠⎞ * c 2 × ( − 1 2 ) \stackrel{c_2\times(-\frac{1}{2}) }\longrightarrow *c2×(−21) ( 1 − 1 1 1 0 0 1 − 1 0 0 − 3 3 ) \begin{pmatrix}1 & -1 & 1 & 1 \\0 & 0 & 1 & -1 \\0 & 0 & -3 & 3 \\\end{pmatrix} ⎝⎛100−10011−31−13⎠⎞ * eliminate Go to 3 Of x 3 \stackrel{ elimination 3 Of x_3 }\longrightarrow * eliminate Go to 3 Of x3 ( 1 − 1 1 1 0 0 1 − 1 0 0 0 0 ) \begin{pmatrix}1 & -1 & 1 & 1 \\0 & 0 & 1 & -1 \\0 & 0 & 0 & 0\end{pmatrix} ⎝⎛100−1001101−10⎠⎞
Write the equations corresponding to the ladder matrix obtained above as follows :
{ x 1 − x 2 + x 3 = 1 0 + 0 + x 3 = − 1 0 + 0 + 0 = 0 \begin{cases} x_1-x_2+x_3=1 \\ 0 + 0 +x_3 = -1 \\ 0 + 0 + 0 = 0 \end{cases} ⎩⎪⎨⎪⎧x1−x2+x3=10+0+x3=−10+0+0=0
It can be obtained that the stepped equations have infinite solutions , Thus, the original equations also have infinite solutions !
2. Summative guess
The shape is as follows n A system of elementary linear equations :
{ a 11 x 1 + a 12 x 2 + . . . + a 1 n x n = b 1 a 21 x 1 + a 22 x 2 + . . . + a 2 n x n = b 2 . . . a n 1 x 1 + a n 2 x 2 + . . . + a n n x n = b n ( 1 ) \begin{cases} a_{11}x_1+a_{12}x_2+...+a_{1n}x_n=b1 \\ a_{21}x_1+a_{22}x_2+...+a_{2n}x_n = b2 \\ ... \\ a_{n1}x_1+a_{n2}x_2 + ...+ a_{nn}x_n = b_n \end{cases} \quad (1) ⎩⎪⎪⎪⎨⎪⎪⎪⎧a11x1+a12x2+...+a1nxn=b1a21x1+a22x2+...+a2nxn=b2...an1x1+an2x2+...+annxn=bn(1)
Equations (1) There are only three cases of solutions : unsolvable , There is a unique solution , There are infinite solutions .
By putting the equations (1) Of Augmented matrix Transformed into Stepped matrix . If the corresponding ladder equations appear "0=d(d It's nonzero )", Then the original equations unsolvable ; Otherwise, the original equations Have solution .
When there is a solution , If the number of non-zero rows of a stepped matrix r=n(n Is the number of unknowns ), Then the original equations have Unique solution ; if r<n, Then the original equations have Infinite solutions .
The above is about n The solutions of linear equations and their criteria need to be further proved before they can be confirmed , But first of all, it's right to tell you .
边栏推荐
- 使用ML.NET+ONNX预训练模型整活B站经典《华强买瓜》
- Typescript learning summary
- Communication software development and Application
- 做软件测试三年,薪资不到20K,今天,我提出了辞职…
- IIS修改配置信息后不生效
- The normal one inch is 25.4 cm, and the image field is 16 cm
- Wechat applet training notes 1
- Rollup, cube and grouping sets functions of grouping functions
- QT:QSS自定义 QSpinBox实例
- 17K薪资要什么水平?来看看95后测试工程师的面试全过程…
猜你喜欢

嵌入式軟件測試怎麼實現自動化測試?

Pour vous amener dans le monde des bases de données natives du cloud

Cause: org. apache. ibatis. builder. Builderexception: error parsing SQL mapper configuration problem analysis

Multiple IO transfer - preamble

你真的需要自动化测试吗?

Hard goods | write all the codes as soon as you change the test steps? Why not try yaml to realize data-driven?

What kind of living condition is a tester with a monthly salary of more than 10000?

QT:QSS自定义 QProgressBar实例

I have been doing software testing for three years, and my salary is less than 20K. Today, I put forward my resignation

测试理论概述
随机推荐
The normal one inch is 25.4 cm, and the image field is 16 cm
测试理论概述
Have you learned the new technology to improve sales in 2021?
Qt:qss custom qmenubar instance
Basic theoretical knowledge of software testing -- app testing
STM32F1与STM32CubeIDE编程实例-TM1637驱动4位7段数码管
Qt:qss custom QSlider instance
Overview of testing theory
After 8 years of industry thinking, the test director has a deeper understanding of test thinking
Solution: jupyter notebook does not pop up the default browser
Extern keyword
字节跳动大裁员,测试工程师差点遭团灭:大厂招人背后的套路,有多可怕?
Software testing e-commerce projects that can be written into your resume, don't you come in and get it?
QT:QSS自定义 QTreeView实例
Logstash backup tracks the data records reported
MAUI Developer Day in GCR
Flink chain conditional source code analysis
Hard goods | write all the codes as soon as you change the test steps? Why not try yaml to realize data-driven?
QT:QSS自定义 QTabWidget 和 QTabBar实例
How does MySQL find the latest data row that meets the conditions?