File tree Expand file tree Collapse file tree 1 file changed +131
-0
lines changed
pythonProblems/matrixpractice Expand file tree Collapse file tree 1 file changed +131
-0
lines changed Original file line number Diff line number Diff line change 125125dt_4 = dt_4_first - dt_4_second
126126
127127print ("dt4 = {}" .format (dt_4 ))
128+
129+
130+ # 4a + 3b = 6
131+ # 1a - 5b = 8
132+
133+ # a = 0 b = 2
134+
135+ # Solution is non-singular, as the second row cannot be replicated from the first row,
136+ # so therefore, the first row is linearly independent.
137+
138+ # 4a + 3b + 1c = 6
139+ # 1a - 5b + 7c = 8
140+ # 5a - 2b + 8c = 14
141+
142+ # 4a + 3b + 1c
143+ # 1a - 5b + 7c
144+
145+
146+ # 5a + - 2b + 8c
147+
148+ # Since row 3 can be replicated from row 1 by adding them together, the
149+ # system is singular, and is redundant, therefore the third row
150+ # is linearly dependant
151+
152+
153+ # divide by coefficient of a
154+ # 5a + b = 17
155+ # 4a - 3b = 6
156+
157+ # Dividing first equation by 5 and second one by 4 gives us
158+
159+ # a + b/5 = 3.4
160+ # a - 0.75b = 1.5
161+
162+ # subtract first equation from the second one to remove a
163+
164+ # a - 0.75b = 1.5
165+ # - a + 0.2b = 3.4
166+
167+ # 0a - 0.95b = -1.9 # Divide by -0.95 on both sides to get
168+ # b = 2
169+
170+ # to find A
171+ # a + 0.2(2) = 3.4
172+ # a + 0.4 = 3.4
173+ # a = 3
174+
175+
176+ # 2a + 5b = 46
177+ # 8a + b = 32
178+
179+ # Eliminate a from the equation
180+
181+ # Divide by coefficient of a
182+ # a + 2.5b = 23
183+ # a + .125b = 4
184+
185+ # Subtract first from second
186+
187+ # a + .125b = 4
188+ # - a + 2.5b = 23
189+ # - 2.375b = -19
190+ # b = 8.0
191+
192+
193+ # a + 2.5(8) = 23
194+ # a + 20 = 23
195+ # a = 3
196+
197+ # 5a + b = 11
198+ # 10a + 2b = 22
199+
200+
201+ # a + b/5 = 2.2
202+ # a + b/5 = 2.2
203+
204+
205+ # a = x
206+ # b = (2.2 - x) / 5
207+
208+ # a + b + 2c = 12
209+ # 3a - 3b - c = 3
210+ # 2a - b + 6c = 24
211+
212+ # # Divide each row by the coefficient of a
213+ # # a + b + 2c = 12
214+ # # a - b - c/3 = 1
215+ # # a - b/2 + 3c = 12
216+
217+ # a - b/2 + 3c = 12
218+ # - a + b + 2c = 12
219+ # ---------------------
220+ # 0a -1.5b + c = 0
221+
222+
223+ # a - b - c/3 = 1
224+ # - a + b + 2c = 12
225+ # --------------------
226+ # 0a -2b -2.3c = -11
227+
228+ # 1st:
229+ # -2b - 2.3c = -11
230+
231+ # 2nd:
232+ # -1.5b + c = 0
233+
234+ # # Divide by the coefficients
235+
236+ # 1st:
237+
238+ # b -2.3/-2c = -11/-2
239+ # b + 7/6c = 11/2
240+
241+ # 2nd:
242+ # b - c/1.5 = 0
243+
244+ # Subtract 1st from 2nd
245+
246+ # b - 2/3c = 0
247+ # - b + 7/6c = 11/2
248+ # -------------------------------
249+ # -1 * (2/3 + 7/6)c = -11/2
250+
251+ # -11/6c = -11/2
252+ # c = 3
253+
254+ # b + 7/6(3) = 11/2
255+ # b = 2
256+
257+ # a + 2 + 2(3) = 12
258+ # a = 4
You can’t perform that action at this time.
0 commit comments