MM Linear
MM Linear
Linear Algebra
Kaushal patel
Traffic flow
• Network of one way streets
Traffic flow
• Network of one way streets
A B
Problem:
Find the flow rate of
cars on each segment
of streets
C D
Traffic flow
• Network of one way streets
𝑥1
85 cars/h
A B
Problem:
Find the flow rate of
45 cars/h
𝑥2
𝑥3 cars on each segment
of streets
𝑥4 C D 𝑥5
70 cars/h
Traffic flow 85 cars/h
𝑥1
A B
• Observation
45 cars/h
• Flow into an intersection = flow out of that 𝑥2
intersection 𝑥3
• Total flow in = total flow out
• IN = OUT 𝑥4 C D 𝑥5
• Total 85 + 𝑥4 = 120 + 𝑥5 70 cars/h
• @𝐴 85 = 𝑥1 + 𝑥2
• @𝐵 𝑥1 + 𝑥3 + 45 = 120 Problem:
• @𝐶 𝑥2 + 𝑥4 = 70 + 𝑥3 Find the flow rate of
• @𝐷 70 = 45 + 𝑥5 cars on each segment
of streets
Traffic flow 85 cars/h
A
𝑥1
B
45 cars/h
85 + 𝑥4 = 120 + 𝑥5 𝑥2
85 = 𝑥1 + 𝑥2 𝑥3
𝑥1 + 𝑥3 + 45 = 120
𝑥2 + 𝑥4 = 70 + 𝑥3 𝑥4 C D 𝑥5
70 = 45 + 𝑥5 70 cars/h
⇓
𝑥4 − 𝑥5 = 35 1 0 1 0 0
0 0 0 1 −1 35 75
𝑥1 + 𝑥2 = 85 1 1 0 0 0 85 0 1 −1 0 0 10
𝑥1 + 𝑥3 = 75 1 0 1 0 0 75 ⇒ 0
0
0 0 1 0
0 0 0 1
60
25
0 1 −1 1 0 70
𝑥2 − 𝑥3 + 𝑥4 = 70 0 0 0 0 1 25 0 0 0 0 0 0
𝑥5 = 25
Traffic flow
1 0 1 0 0 75
75 − 𝑥3
0 1 −1 0 0 10 85 cars/h
0 0 0 1 0 60 A B
0 0 0 0 1 25
45 cars/h
0 0 0 0 0 0 10 + 𝑥3
⇓ 𝑥3
𝑥1 = 75 − 𝑥3
𝑥2 = 10 + 𝑥3 60 C D 25
𝑥4 = 60 70 cars/h
𝑥5 = 25
𝑥3 = 𝑓𝑟𝑒𝑒
Electrical Networks
15 V
2Ω 5Ω
A B
4Ω
2Ω
20 V
Electric Network 𝑖1
1 0 0 0.2 𝑖1 = 0.2
0 1 0 3.2 ⇒ 𝑖2 = 3.2
0 0 1 3.4
𝑖3 = 3.4
Balancing Chemical Reactions
• 𝐶3 𝐻8 + 𝑂2 ⇒ 𝐶𝑂2 + 𝐻2 𝑂
• 𝑋1 𝐶3 𝐻8 + 𝑋2 𝑂2 ⇒ 𝑋3 𝐶𝑂2 + 𝑋4 𝐻2 𝑂
• The numbers 𝑋1 , 𝑋2 , 𝑋3 , 𝑋4 are positive integers
• The number of atoms of each element on the left side is the same as
the number of atoms on the right side.
Left Right
C 3 𝑋1 𝑋3
3𝑋1 = 𝑋3 3𝑋1 − 𝑋3 = 0
H 8 𝑋1 2 𝑋4
⇒ 8𝑋1 = 2𝑋4 ⇒ 8𝑋1 − 2𝑋4 = 0
0 2 𝑋2 2 𝑋3 + 𝑋4
2𝑋2 = 2𝑋3 + 𝑋4 2𝑋2 − 2𝑋3 − 𝑋4 = 0
Balancing Chemical Reactions
• 𝐶3 𝐻8 + 𝑂2 ⇒ 𝐶𝑂2 + 𝐻2 𝑂
• 𝑋1 𝐶3 𝐻8 + 𝑋2 𝑂2 ⇒ 𝑋3 𝐶𝑂2 + 𝑋4 𝐻2 𝑂
3𝑋1 − 𝑋3 = 0 𝑋1 =0
𝑋 =0
⇒ 8𝑋1 − 2𝑋4 = 0 ⇒ 2 𝐼𝑆 𝐴 𝑇𝑅𝐼𝑉𝐼𝐴𝐿 𝑆𝑂𝐿𝑈𝑇𝐼𝑂𝑁
𝑋3 =0
2𝑋2 − 2𝑋3 − 𝑋4 = 0 𝑋4 =0
1
𝑋1 =
1 4
1 0 5 𝑋1 = 1
0 −
4 ⇒ 𝑋2 = 4 𝐿𝐸𝑇 𝑋 = 4 ⇒
𝑋2 = 5
3 0 −1 0 5 4 𝑋3 = 3
⇒ 0 1 0 − 3
⇒ 8 0 0 −2 4 𝑋3 = 𝑋4 = 4
3 4
0 2 −2 −1 0 0 𝑋4 = 𝐹𝑅𝐸𝐸 𝐶3 𝐻8 + 5 𝑂2 ⇒ 3 𝐶𝑂2 + 4𝐻2 𝑂
1 −