summaryrefslogtreecommitdiff
path: root/FSF-2020/linear-algebra
diff options
context:
space:
mode:
authorArchit Sangal2020-06-03 10:10:02 +0530
committerArchit Sangal2020-06-03 10:10:02 +0530
commitb9a88691d72bab96e46fd26650308d05904c0b1d (patch)
tree550b1c77f7d61c4278f1fcd5b8f2dc9a9914c537 /FSF-2020/linear-algebra
parenta069621544a5e21857979af1a630e85c73f31ba7 (diff)
downloadFSF-mathematics-python-code-archive-b9a88691d72bab96e46fd26650308d05904c0b1d.tar.gz
FSF-mathematics-python-code-archive-b9a88691d72bab96e46fd26650308d05904c0b1d.tar.bz2
FSF-mathematics-python-code-archive-b9a88691d72bab96e46fd26650308d05904c0b1d.zip
gif 1 and video 1 for lecture 2
Diffstat (limited to 'FSF-2020/linear-algebra')
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif (renamed from FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif)bin1182328 -> 1182328 bytes
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py (renamed from FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py)0
-rw-r--r--FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py145
3 files changed, 145 insertions, 0 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif
index 7d8d2e1..7d8d2e1 100644
--- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif
Binary files differ
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py
index afe4f9a..afe4f9a 100644
--- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py
diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py
new file mode 100644
index 0000000..b16a32a
--- /dev/null
+++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py
@@ -0,0 +1,145 @@
+from manimlib.imports import *
+
+class Row_Space(Scene):
+ def construct(self):
+
+ Heading = TextMobject("Row Space")
+ defn1 = TextMobject("Definition 1: Row Space of a matrix is the linear combination of the rows of that matrix.")
+ defn2 = TextMobject("Definition 2: It is a vector space generated by a linear combination of the columns of $A^{T}$.")
+ equivalent = TextMobject(r"Definition 1 $\equiv$ Definition 2")
+
+ Heading.move_to(2*UP)
+ Heading.set_color(color = DARK_BLUE)
+
+ defn1.move_to(UP)
+ defn1.scale(0.75)
+
+ defn2.scale(0.75)
+
+ equivalent.move_to(DOWN)
+
+ self.play(Write(Heading))
+ self.play(Write(defn1))
+ self.play(Write(defn2))
+ self.play(Write(equivalent))
+
+ self.wait(2)
+ self.play(FadeOut(Heading),FadeOut(defn1),FadeOut(defn2),ApplyMethod(equivalent.move_to,2*UP))
+
+ how = TextMobject("Let us see, How?")
+ how.move_to(UP)
+ self.play(Write(how))
+ self.play(FadeOut(equivalent),FadeOut(how))
+
+ A = TextMobject(r"$A = $",r"$\left( \begin{array}{c c c} 1 & 2 & 1 \\ 1 & 3 & 1 \\ 2 & 1 & 4 \\ 3 & 2 & 3 \end{array} \right)$")
+ A.move_to(2*UP+3*LEFT)
+ A[1].set_color(color = DARK_BLUE)
+ A.scale(0.80)
+
+ self.play(Write(A))
+
+ rows = TextMobject(r"Rows of A $\rightarrow$",
+ r"$\left( \begin{array}{c c c} 1 & 2 & 1 \end{array} \right)$,",
+ r"$ \left( \begin{array}{c c c} 1 & 3 & 1 \end{array} \right)$,",
+ r"$\left( \begin{array}{c c c} 2 & 1 & 4 \end{array} \right)$,",
+ r"$ \left( \begin{array}{c c c} 3 & 2 & 3 \end{array} \right)$")
+ rows.scale(0.75)
+ rows[1:5].set_color(DARK_BLUE)
+ self.play(Write(rows))
+
+ ac_defn1 = TextMobject("According to Definition 1 : ")
+ ac_defn1.move_to(DOWN)
+
+ RS_A = TextMobject(r"Row Space of $A = x_{1}$",
+ r"$\left( \begin{array}{c c c} 1 & 2 & 1 \end{array} \right)$",
+ r"$+x_{2}$",
+ r"$ \left( \begin{array}{c c c} 1 & 3 & 1 \end{array} \right)$",
+ r"$ + x_{3}$",
+ r"$\left( \begin{array}{c c c} 2 & 1 & 4 \end{array} \right)$",
+ r"$+x_{4}$",
+ r"$ \left( \begin{array}{c c c} 3 & 2 & 3 \end{array} \right)$")
+ RS_A.move_to(DOWN+DOWN)
+ RS_A[6].move_to(2*DOWN+DOWN)
+ RS_A[7].move_to(2*DOWN+2*RIGHT+DOWN)
+ RS_A[1].set_color(color = DARK_BLUE)
+ RS_A[3].set_color(color = DARK_BLUE)
+ RS_A[5].set_color(color = DARK_BLUE)
+ RS_A[7].set_color(color = DARK_BLUE)
+ RS_A.scale(0.75)
+
+ self.play(FadeOut(rows[0]),Transform(rows[1],RS_A[1]),Transform(rows[2],RS_A[3]),Transform(rows[3],RS_A[5]),Transform(rows[4],RS_A[7]))
+ self.play(FadeIn(ac_defn1), Write(RS_A))
+ self.wait(1)
+
+ self.play(FadeOut(rows[1]), FadeOut(rows[2]), FadeOut(rows[3]), FadeOut(rows[4]), FadeOut(RS_A), FadeOut(ac_defn1))
+
+ A_T = TextMobject(r"$A^{T} = $",r"$\left( \begin{array}{c c c c} 1 & 1 & 2 & 3 \\ 2 & 3 & 1 & 2 \\ 1 & 1 & 4 & 3 \end{array} \right)$")
+ A_T.move_to(2*UP+3*RIGHT)
+ A_T[1].set_color(color = DARK_BLUE)
+ A_T.scale(0.80)
+
+ self.play(Write(A_T))
+
+ change1 = TextMobject(r"Rows of $A\equiv$ Columns of $A^{T}$")
+ change2 = TextMobject(r"Columns of $A\equiv$ Rows of $A^{T}$")
+ change2.move_to(DOWN)
+
+ change3 = TextMobject(r"Row Space of $A$ = Linear Combination of",r"Rows","of",r"A")
+ change3.move_to(2*DOWN)
+ change3[1].set_color(DARK_BLUE)
+ change3[3].set_color(DARK_BLUE)
+
+ self.play(Write(change1))
+ self.play(Write(change2))
+ self.play(Write(change3))
+
+ columns = TextMobject("Columns")
+ columns.scale(0.6)
+ columns.set_color(DARK_BLUE)
+ columns.move_to(2*DOWN+4.1*RIGHT)
+
+ a = TextMobject(r"$A^{T}$")
+ a.set_color(DARK_BLUE)
+ a.move_to(1.95*DOWN+5.6*RIGHT)
+
+ self.wait(0.5)
+
+ self.play(Transform(change3[1],columns), Transform(change3[3],a))
+
+ equal = TextMobject(r"= Column Space($A^{T}$)")
+ equal.move_to(3*DOWN+0.5*RIGHT)
+
+ self.play(Write(equal))
+
+ self.play(FadeOut(A_T), FadeOut(change1), FadeOut(change2), FadeOut(change3), FadeOut(A), FadeOut(equal))
+
+ ac_defn1.move_to(3*UP)
+ RS_A.move_to(1.5*UP)
+ RS_A[6].move_to(UP)
+ RS_A[7].move_to(UP+1.5*RIGHT)
+
+ self.play(Write(RS_A),FadeIn(ac_defn1))
+
+ CS_AT = TextMobject(r"Row Space of $A = x_{1}$",
+ r"$\left( \begin{array}{c} 1 \\ 2 \\ 1 \end{array} \right)$",
+ r"$+x_{2}$",
+ r"$ \left( \begin{array}{c} 1 \\ 3 \\ 1 \end{array} \right)$",
+ r"$ + x_{3}$",
+ r"$\left( \begin{array}{c} 2 \\ 1 \\ 4 \end{array} \right)$",
+ r"$+x_{4}$",
+ r"$ \left( \begin{array}{c} 3 \\ 2 \\ 3 \end{array} \right)$")
+ CS_AT.move_to(1.5*DOWN)
+ CS_AT[1].set_color(color = DARK_BLUE)
+ CS_AT[3].set_color(color = DARK_BLUE)
+ CS_AT[5].set_color(color = DARK_BLUE)
+ CS_AT[7].set_color(color = DARK_BLUE)
+ CS_AT.scale(0.75)
+
+ ac_defn2 = TextMobject("According to Definition 2 : ")
+ equivalent = TextMobject(r"Hence, Definition 1 $\equiv$ Definition 2")
+ equivalent.move_to(3*DOWN)
+
+ self.play(Write(CS_AT),FadeIn(ac_defn2))
+ self.play(Write(equivalent))
+
+ self.wait()