From b9a88691d72bab96e46fd26650308d05904c0b1d Mon Sep 17 00:00:00 2001 From: Archit Sangal Date: Wed, 3 Jun 2020 10:10:02 +0530 Subject: gif 1 and video 1 for lecture 2 --- .../Column_Space.gif | Bin 1182328 -> 0 bytes .../The-Four-Fundamental-Subspaces/Column_Space.py | 30 ----- .../file1_Column_Space.gif | Bin 0 -> 1182328 bytes .../file1_Column_Space.py | 30 +++++ .../file2_Row_Space.py | 145 +++++++++++++++++++++ 5 files changed, 175 insertions(+), 30 deletions(-) delete mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif delete mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_Row_Space.py (limited to 'FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces') 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/Column_Space.gif deleted file mode 100644 index 7d8d2e1..0000000 Binary files a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.gif and /dev/null 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/Column_Space.py deleted file mode 100644 index afe4f9a..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Column_Space.py +++ /dev/null @@ -1,30 +0,0 @@ -from manimlib.imports import * - -class Column_Space(Scene): - def construct(self): - - 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) - A[1].set_color(color = DARK_BLUE) - A.scale(0.75) - - self.play(Write(A),run_time = 1) - - CS_A = TextMobject(r"Column Space of $A = x_{1}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 2 \\ 3 \end{array} \right)$",r"$+x_{2}$",r"$ \left( \begin{array}{c} 2 \\ 3 \\ 1 \\ 2 \end{array} \right)$",r"$ + x_{3}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 4 \\ 3 \end{array} \right)$") - CS_A.move_to(1.5*LEFT+1*DOWN) - CS_A[1].set_color(color = DARK_BLUE) - CS_A[3].set_color(color = DARK_BLUE) - CS_A[5].set_color(color = DARK_BLUE) - CS_A.scale(0.75) - - self.play(Write(CS_A),run_time = 2) - - arrow1 = Arrow(start = 1.25*UP,end = 0.25*DOWN+1.75*LEFT) - arrow2 = Arrow(start = 1.35*UP+0.5*RIGHT,end = 0.25*DOWN+0.5*RIGHT) - arrow3 = Arrow(start = 1.25*UP+0.75*RIGHT,end = 0.25*DOWN+2.9*RIGHT) - - Defn = TextMobject("Linear Combination of Columns of Matrix") - Defn.move_to(3*DOWN) - - self.play(Write(Defn), ShowCreation(arrow1), ShowCreation(arrow2), ShowCreation(arrow3),run_time = 1) - self.wait(1) \ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif new file mode 100644 index 0000000..7d8d2e1 Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif differ diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py new file mode 100644 index 0000000..afe4f9a --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.py @@ -0,0 +1,30 @@ +from manimlib.imports import * + +class Column_Space(Scene): + def construct(self): + + 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) + A[1].set_color(color = DARK_BLUE) + A.scale(0.75) + + self.play(Write(A),run_time = 1) + + CS_A = TextMobject(r"Column Space of $A = x_{1}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 2 \\ 3 \end{array} \right)$",r"$+x_{2}$",r"$ \left( \begin{array}{c} 2 \\ 3 \\ 1 \\ 2 \end{array} \right)$",r"$ + x_{3}$",r"$\left( \begin{array}{c} 1 \\ 1 \\ 4 \\ 3 \end{array} \right)$") + CS_A.move_to(1.5*LEFT+1*DOWN) + CS_A[1].set_color(color = DARK_BLUE) + CS_A[3].set_color(color = DARK_BLUE) + CS_A[5].set_color(color = DARK_BLUE) + CS_A.scale(0.75) + + self.play(Write(CS_A),run_time = 2) + + arrow1 = Arrow(start = 1.25*UP,end = 0.25*DOWN+1.75*LEFT) + arrow2 = Arrow(start = 1.35*UP+0.5*RIGHT,end = 0.25*DOWN+0.5*RIGHT) + arrow3 = Arrow(start = 1.25*UP+0.75*RIGHT,end = 0.25*DOWN+2.9*RIGHT) + + Defn = TextMobject("Linear Combination of Columns of Matrix") + Defn.move_to(3*DOWN) + + self.play(Write(Defn), ShowCreation(arrow1), ShowCreation(arrow2), ShowCreation(arrow3),run_time = 1) + self.wait(1) \ No newline at end of file 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() -- cgit