Download presentation
Presentation is loading. Please wait.
Published byKimberly Manning Modified over 9 years ago
1
Puff! The magic dragon, live by the sea… 第 6 章 線性代數方程式 Linear Algebraic Equations
2
Puff! The magic dragon, live by the sea… linear 5x-2y=13 7x+3y=24 Linear ~ dependent variable 不可以有一次以 外的次方
3
Puff! The magic dragon, live by the sea… 6.1 Elementary Solution Methods Successive elimination of variables Gauss elimination
4
Puff! The magic dragon, live by the sea… Gauss elimination -x+y+2z=2(1) 3x-y+z=6(2) -x+3y+4z=4(3) -x+y+2z=2(1) 2y+7z=12(4) 2y+2z=2(5)
5
Puff! The magic dragon, live by the sea… Gauss elimination -x+y+2z=2(1) 5z=10(6) y=-1(7) x=1
6
Puff! The magic dragon, live by the sea… Self test p.334
7
Puff! The magic dragon, live by the sea… Singular & ill-conditioned problems 1.3x-4y=5 6x-10y=2 Sol. (7,4) 2.3x-4y=5 6x-8y=10 Infinite solutions 3.3x-4y=5 6x-8y=3 empty set
8
Puff! The magic dragon, live by the sea…
9
Puff! The magic dragon, live by the sea…
10
Puff! The magic dragon, live by the sea… Homogeneous equations 6x+ay=0 2x+4y=0 (a-12)y=0 If a~=12, x=0 If a=12, infinite solutions
11
Puff! The magic dragon, live by the sea… Ill-conditioned equations 3x-4y=5(1) 6x-8.002y=3(2) (1) y=(3x-5)/4 (2) y=(3x-1.5)/4.001 (x,y)=(4668, 3500) Very sensitive !
12
Puff! The magic dragon, live by the sea… Matrix methods for linear equations
13
Puff! The magic dragon, live by the sea…
14
Puff! The magic dragon, live by the sea… Determinants 行列式 A=[3,-4,1;6,10,2;9,-7,3]; det(A) ans = 0
15
Puff! The magic dragon, live by the sea… Determinants and singular problems If determinant of A=0, then a singular problem. If determinant of A ~= 0 If determinant of A = 0
16
Puff! The magic dragon, live by the sea… Left-division method A=[3,2,-9;-9,-5,2;6,7,3]; det(A) b=[-65;16;5]; A\b ans = 288 ans = 2.0000 -4.0000 7.0000
17
Puff! The magic dragon, live by the sea… Right-division method
18
Puff! The magic dragon, live by the sea… Ex.6.2-2 p.342 Kirchhoff’s law Current conservation at a node
19
Puff! The magic dragon, live by the sea…
20
Puff! The magic dragon, live by the sea… % resist.m % solve the current i_1,i_2,i_3 R=[5,100,200,150,250]*1000; v1=100; v2=50; A1=[R(1)+R(4),-R(4),0]; A2=[-R(4),R(2)+R(4)+R(5),- R(5)]; A3=[0,R(5),-(R(3)+R(5))]; A=[A1;A2;A3]; b=[v1;0;v2]; current=A\b; disp('The currents are:') disp(current) The currents are: 1.0e-003 * 0.9544 0.3195 0.0664
21
Puff! The magic dragon, live by the sea… Exercise p.343-345
22
Puff! The magic dragon, live by the sea… Matrix inverse
23
Puff! The magic dragon, live by the sea… An example of Statics Derivation of equilibrium equations. Solve the linear equations by matlab. P.346-348
24
Puff! The magic dragon, live by the sea… Ex. 6.2-5 Check by matlab as well as by hand for an inversion of 2 by 2 matrix. 2x+9y=5 3x-4y=7 A=[2,9;3,-4]; b=[5;7]; x=inv(A)*b x = 2.3714 0.0286
25
Puff! The magic dragon, live by the sea…
26
Puff! The magic dragon, live by the sea… Cramer’s method Self test …
27
Puff! The magic dragon, live by the sea… 6.4 Underdetermined systems A=[1,3]; b=6; x=A\b x = 0 2
28
Puff! The magic dragon, live by the sea… Underdetermined systems
29
Puff! The magic dragon, live by the sea… Matrix rank 矩陣的秩 A=[3,-4,1;6,10,2;9,-7,3]; rank(A) ans = 2
30
Puff! The magic dragon, live by the sea… Existence and uniqueness of solutions Augmented matrix
31
Puff! The magic dragon, live by the sea… Existence and uniqueness of solutions Augmented matrix
32
Puff! The magic dragon, live by the sea… Singular matrix
33
Puff! The magic dragon, live by the sea… Ex 6.4-1 3x-2y+8z=48 -6x+5y+z=-12 9x+4y+2z=24 A=[3,-2,8;-6,5,1;9,4,2]; b=[48;-12;24]; rank(A) rank([A b]) x=A\b ans = 3 ans = 3 x = 2.0000 5.0000
34
Puff! The magic dragon, live by the sea… Ex 6.4-2 2x-4y+5z=-4 -4x-2y+3z=4 2x+6y-8z=0 A=[2,-4,5;-4,-2,3;2,6,-8]; b=[-4;4;0]; rank(A) rank([A b]) x=A\b ans = 2 ans = 2 Warning: Matrix is singular to working precision. x = Inf
35
Puff! The magic dragon, live by the sea… pinv command & Euclidean norm x=pinv(A)*b x = -1.2148 0.2074 -0.1481
36
Puff! The magic dragon, live by the sea… Ex 6.4-3 Statically indeterminate problem
37
Puff! The magic dragon, live by the sea…
38
Puff! The magic dragon, live by the sea…
39
Puff! The magic dragon, live by the sea… A=[1,1,1;10,5,0]; b=[400;1600]; rank(A) rank([A b]) A\b ans = 2 ans = 2 ans = 160.0000 0 240.0000 pinv(A)*b ans = 93.3333 133.3333 173.3333
40
Puff! The magic dragon, live by the sea… Ex 6.4-4, pp.362 2x-4y+5z=-4 -4x-2y+3z=4 2x+6y-8z=0 x+0y-0.1z=-1.2 0x+y-1.3z=0.4 0x+0y+0z=0 A=[2,-4,5;-4,-2,3;2,6,-8]; b=[-4;4;0]; x=pinv(A)*b rref([A b]) x = -1.2148 0.2074 -0.1481 ans = 1.0000 0 -0.1000 -1.2000 0 1.0000 -1.3000 0.4000 0 0 0 0
41
Puff! The magic dragon, live by the sea… Underdetermined systems P.363-364 ex.6.4-5 5x+3y+3z=40 3x+3y+4z=30 x-0.5z=5 y+1.8333z=5 A=[5,3,3;3,3,4]; b=[40;30]; rref([A b]) ans = 1.0000 0 -0.5000 5.0000 0 1.0000 1.8333 5.0000
42
Puff! The magic dragon, live by the sea… Ex 6.4-6 p.364 100+200=f1+f4 f1+f2=300+200 600+400=f2+f3 f3+f4=300+500
43
Puff! The magic dragon, live by the sea…
44
Puff! The magic dragon, live by the sea…
45
Puff! The magic dragon, live by the sea…
46
Puff! The magic dragon, live by the sea…
47
Puff! The magic dragon, live by the sea…
48
Puff! The magic dragon, live by the sea…
49
Puff! The magic dragon, live by the sea…
50
Puff! The magic dragon, live by the sea…
51
Puff! The magic dragon, live by the sea…
52
Puff! The magic dragon, live by the sea…
53
Puff! The magic dragon, live by the sea…
54
Puff! The magic dragon, live by the sea…
55
Puff! The magic dragon, live by the sea…
56
Puff! The magic dragon, live by the sea…
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.