Link to this document’s Jupyter Notebook
###StartPreClass###
04 Pre-Class Assignment: Python Linear Algebra Packages¶
Recommended further readings for this pre-class assignment.¶
1. The Syntax for Systems of Linear Equations¶
The following video explains the different syntax we use to describe linear systems.
from IPython.display import YouTubeVideo
YouTubeVideo("AQJeOg4ZoIk",width=640,height=360, cc_load_policy=True)
The following is a summary of the syntax shown in the video:
Linear Equation $\(b = a_1x_1+a_2x_2+a_3x_3 + \ldots a_nx_n\)$¶
System of linear equations¶
System of linear equations (Matrix format)¶
System of linear equations (Augmented Form)¶
1. Introduction to Gauss Jordan Elimination¶
The following elementary row operations
Interchange two rows of a matrix
Multiply the elements of a row by a nonzero constant
Add a multiple of the elements of one row to the corresponding elements of another
from IPython.display import YouTubeVideo
YouTubeVideo("iGmtmF_hm2g",width=640,height=360, cc_load_policy=True)
Consider the element \(a_{2,1}\) in the following \(A\) Matrix.
$\(
A = \left[
\begin{matrix}
1 & 1 \\
20 & 25
\end{matrix}
\, \middle\vert \,
\begin{matrix}
30 \\
690
\end{matrix}
\right]
\)$
✅ QUESTION: : Describe an elementary row operation that could be used to make element \(a_{(2,1)}\) zero?
Put your answer here.
✅ QUESTION: : What is the new matrix given the above row operation.
Modify the contents of this cell and put your answer to the above question here.
$\(
A = \left[
\begin{matrix}
1 & 1 \\
0 & ??
\end{matrix}
\, \middle\vert \,
\begin{matrix}
30 \\
??
\end{matrix}
\right]
\)$
Hint, we are using a formating language called Latex to display the above matrix. You should just be able to replace the ?? with your new numbers. If you can’t figure out what is going on, try searching the web with “latex math and matrix.” If it still doesn’t make sense, format your answer in another way that will be clear to understand by the you and the instructor.
The following function is a basic implementation of the Gauss-Jorden algorithm to an (m,m+1) augmented matrix:
2. Gauss Jordan Elimination and the Row Echelon Form¶
from IPython.display import YouTubeVideo
YouTubeVideo("v6RstFsrTJY",width=640,height=360, cc_load_policy=True)
The above video left out a special case for Reduced Row Echelon form. There can be non-zero elements in columns that do not have a leading one. For example, All of the following are in Reduced Row Echelon form:
✅ QUESTION: : What are the three steps in the Gauss-Jordan Elimination algorithm?
Put your answer here.
3. Gauss Jordan Practice¶
✅ DO THIS:: Solve the following system of linear equations using the Gauss-Jordan algorithm. Try to do this before watching the video!
Put your answer here
In the following video, we solve the same set of linear equations. Watch the video after trying to do this on your own. It is provided here in case you get stuck.
from IPython.display import YouTubeVideo
YouTubeVideo("xT16yIVw_KE",width=640,height=360, cc_load_policy=True)
✅ QUESTION:: Something was unclear in the above videos. Describe the difference between a matrix in “row echelon” form and “reduced row echelon” form.
Put your answer to the above question here
4. Assignment wrap up¶
✅ Assignment-Specific QUESTION: Describe the difference between a matrix in “row echelon” form and “reduced row echelon” form.
Put your answer to the above question here
✅ QUESTION: Summarize what you did in this assignment.
Put your answer to the above question here
✅ QUESTION: What questions do you have, if any, about any of the topics discussed in this assignment after working through the jupyter notebook?
Put your answer to the above question here
✅ QUESTION: How well do you feel this assignment helped you to achieve a better understanding of the above mentioned topic(s)?
Put your answer to the above question here
✅ QUESTION: What was the most challenging part of this assignment for you?
Put your answer to the above question here
✅ QUESTION: What was the least challenging part of this assignment for you?
Put your answer to the above question here
✅ QUESTION: What kind of additional questions or support, if any, do you feel you need to have a better understanding of the content in this assignment?
Put your answer to the above question here
✅ QUESTION: Do you have any further questions or comments about this material, or anything else that’s going on in class?
Put your answer to the above question here
✅ QUESTION: Approximately how long did this pre-class assignment take?
Put your answer to the above question here
Written by Dr. Dirk Colbry, Michigan State University
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.