CS2810 - Lecture 3
CS2810 - Lecture 3
Lecture 3
Solving Linear systems
Gaussian Elimination
By. Professor Wu
In-class Extra credit Policy Change
- The previous policy is that you just need to submit something that showed you came to class and
worked on the questions you would get the credit.
- This resulted in several students cheating and didn’t bother to attempt the last class exercise (this
defeats the spirit of the extra credit)
- New policy:
- All class work would have to be submitted to get the credit.
- You would have to submit a separate image for each exercise
- We will extend the submission time to 11:00pm to give you extra time.
- Please submit only in the following formats: .py, .pdf, .jpg, .png (canvas cannot read .HEIC
or other formats)
-
- For class 1, we will still accept partial work.
- For class 2, you will have till the end of today to re-submit all the work (if you didn’t submit everything)
- Going forward, you would have to submit everything.
Homework policy
- Change my mind:
- I really want you to get a lot of latex practice
- It makes it impossible to give partial credits.
- It is just too easy to copy someone else’s latex code.
- If you work out the homework yourself,
- it should look sufficiently different from other people’s work
- But if you only have the solution, everybody’s work will look the same.
The TA and I really want everyone to learn a lot and do well in this class.
- We talked and the TAs volunteered to give you guys extra office hours.
Gaussian Elimination.
Let’s look at a simple example
Notation Simplification
Notice that when we use the Gaussian Elimination so far, we
have to copy x1, x2 over and over again. This is really not
necessary. Instead, we can simplify the copying by representing
the linear system with matrix notation.
Let’s now solve a linear system of 4 equations
Once you have a solution, plug x back in and see of all the
statements are still True
Don’t worry if you got it wrong, it takes a lot of practice
If you didn’t get the right solution, go back home and try again.
It is important for you to write out all the steps you took to reach
the solution. (This allows you to go back and review your logic
flaw if you made a mistake)
Solving them in python
How do you get the RREF with sympy
>>> print(M_rref[0])
You are welcome to ask a friend or TA for help if you are confused.