diff options
Diffstat (limited to 'FSF-2020/linear-algebra/linear-transformations')
58 files changed, 731 insertions, 141 deletions
diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file3_Non_Standard_Basis.py b/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file3_Non_Standard_Basis.py deleted file mode 100644 index 6410a2c..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file3_Non_Standard_Basis.py +++ /dev/null @@ -1,51 +0,0 @@ -from manimlib.imports import * - -class NSB(ThreeDScene): - def construct(self): - - axes = ThreeDAxes(x_min = -4,x_max=4,y_min=-4,y_max=4,z_min=-4,z_max=4) - self.play(ShowCreation(axes)) - self.move_camera(phi=60*DEGREES,theta=45*DEGREES,run_time=3) - self.begin_ambient_camera_rotation(rate=0.5) - - matrix = [[0.577,0.577,0.577],[-0.577,0.577,0.577],[0.577,-0.577,0.577]] - - line1 = Line(start = ORIGIN,end = 1*RIGHT) - line1.set_color(DARK_BLUE) - tip1 = Polygon(RIGHT,0.9*RIGHT-0.1*DOWN,0.9*RIGHT-0.1*UP) - tip1.set_opacity(1) - tip1.set_fill(DARK_BLUE) - tip1.set_color(DARK_BLUE) - - arrow2 = Line(start = ORIGIN,end = 1*UP) - arrow2.set_color(DARK_BLUE) - tip2 = Polygon(UP,0.9*UP-0.1*RIGHT,0.9*UP-0.1*LEFT) - tip2.set_opacity(1) - tip2.set_fill(DARK_BLUE) - tip2.set_color(DARK_BLUE) - arrow2.set_color(DARK_BLUE) - - arrow3 = Line(start = ORIGIN,end = [0,0,1]) - arrow3.set_color(DARK_BLUE) - tip3 = Polygon([0,0,1],[0,0,0.9]-0.1*RIGHT,[0,0,0.9]-0.1*LEFT) - tip3.set_opacity(1) - tip3.set_fill(DARK_BLUE) - tip3.set_color(DARK_BLUE) - - line1.apply_matrix(matrix) - tip1.apply_matrix(matrix) - arrow2.apply_matrix(matrix) - tip2.apply_matrix(matrix) - arrow3.apply_matrix(matrix) - tip3.apply_matrix(matrix) - - self.play(ShowCreation(line1), ShowCreation(tip1), ShowCreation(arrow2), ShowCreation(tip2), ShowCreation(arrow3), ShowCreation(tip3)) - - text = TextMobject(r"This is also a set of Orthonormal Vectors") - text.set_color(DARK_BLUE) - self.add_fixed_in_frame_mobjects(text) - text.scale(0.6) - text.move_to(3*DOWN+3.5*RIGHT) - self.play(Write(text)) - - self.wait(7)
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/README.md b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/README.md new file mode 100644 index 0000000..832aa5d --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/README.md @@ -0,0 +1,18 @@ +# Contributer: Archit Sangal +My Github Account : <a href="https://github.com/architsangal">architsangal</a> (https://github.com/architsangal) +<br/></br> + +## Sub-Topics Covered: ++ Gramm-Schmidt Orthogonalization Process + +#### Video 1: Introduction to Gram-Schmidt Orthogonalization Process + + +#### Video 2: Obtaining orthogonal vectors using projections + + +#### Video 3: Visual Explanation of how Gram-Schmidt Orthogonalization Process give mutually orthonormal vectors + + +#### Video 4: Example of Orthonormal Vectors which are different from standard basis +
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file_introduction.py b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file1_introduction.py index ccd23c9..ccd23c9 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file_introduction.py +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file1_introduction.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file1_projections.py b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file2_projections.py index dd4b8d4..dd4b8d4 100755 --- a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file1_projections.py +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file2_projections.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file2_orthonormal.py b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file3_orthonormal.py index af51fc6..a74b641 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file2_orthonormal.py +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file3_orthonormal.py @@ -6,7 +6,7 @@ class Algo(ThreeDScene): axes = ThreeDAxes(x_min = -5,x_max=5,y_min=-3,y_max=3,z_min=-4,z_max=4) self.play(ShowCreation(axes)) - text = TextMobject(r"This is the vector $\beta_1(=\left[\begin{array}{c} 4\\0\\0 \end{array}\right])$") + text = TextMobject(r"This is the vector $\beta_1 =\left[\begin{array}{c} 4\\0\\0 \end{array}\right]$") text.set_color(GREEN) text.scale(0.6) text.move_to(3*UP+5*LEFT) @@ -42,7 +42,7 @@ class Algo(ThreeDScene): self.wait() self.play(FadeOut(text)) - text = TextMobject(r"Consider another vector $\beta_2(=\left[\begin{array}{c} 2\\2\\0 \end{array}\right])$") + text = TextMobject(r"Consider another vector $\beta_2=\left[\begin{array}{c} 2\\2\\0 \end{array}\right]$") text1 = TextMobject(r"which is linearly independent to $\beta_1$") text.set_color(GREEN) text1.set_color(GREEN) @@ -141,15 +141,15 @@ class Algo(ThreeDScene): self.add_fixed_orientation_mobjects(axis[1]) ############################################################################# - text = TextMobject(r"These are the same two orthonormal vectors $\alpha_{1}$ and $\alpha_{2}$") - text.scale(0.6) - text.set_color(DARK_BLUE) - self.add_fixed_in_frame_mobjects(text) - text.move_to(3*(DOWN+RIGHT)) - self.play(Write(text)) + self.move_camera(phi=70*DEGREES,theta=30*DEGREES,run_time=3) + xy_plane = Polygon(5*RIGHT+3*UP,-5*RIGHT+3*UP,-5*RIGHT-3*UP,5*RIGHT-3*UP) + xy_plane.set_color("#333333") + xy_plane.set_fill("#333333") + xy_plane.set_opacity(1) + xy_plane.fade(0.7) + self.play(ShowCreation(xy_plane)) - self.move_camera(phi=60*DEGREES,theta=45*DEGREES,run_time=3) - self.begin_ambient_camera_rotation(rate=0.3) + #self.begin_ambient_camera_rotation(rate=0.1) line1 = Line(start = ORIGIN,end = 1*RIGHT) line1.set_color(DARK_BLUE) @@ -183,9 +183,9 @@ class Algo(ThreeDScene): a_tip_c1.set_fill(GOLD_E) a_tip_c1.set_color(GOLD_E) - self.play(FadeOut(text), ShowCreation(a_line), ShowCreation(a_tip), ShowCreation(a_line_c1), ShowCreation(a_tip_c1)) + self.play(ShowCreation(a_line), ShowCreation(a_tip), ShowCreation(a_line_c1), ShowCreation(a_tip_c1)) - text = TextMobject(r"Now, we have a vector $\beta_3(=\left[\begin{array}{c} 2\\2\\2 \end{array}\right])$") + text = TextMobject(r"Now, we have a vector $\beta_3=\left[\begin{array}{c} 2\\2\\2 \end{array}\right]$") text.set_color(GOLD_E) text.scale(0.7) self.add_fixed_in_frame_mobjects(text) @@ -197,8 +197,8 @@ class Algo(ThreeDScene): p_line1 = Line(start = ORIGIN,end = 2*RIGHT) p_line1.set_color(GOLD_E) - p_tip1 = Polygon(RIGHT,0.8*RIGHT+0.2*DOWN,0.8*RIGHT+0.2*UP) - p_tip1.move_to(2*RIGHT) + p_tip1 = Polygon(2*RIGHT,1.8*RIGHT+0.2*DOWN,1.8*RIGHT+0.2*UP) + p_tip1.set_opacity(1) p_tip1.set_fill(GOLD_E) p_tip1.set_color(GOLD_E) @@ -211,6 +211,7 @@ class Algo(ThreeDScene): self.add_fixed_in_frame_mobjects(text) text.move_to(3*(DOWN+RIGHT)) self.play(Write(text)) + self.begin_ambient_camera_rotation(rate=0.05) self.wait() self.play(FadeOut(text)) @@ -241,6 +242,7 @@ class Algo(ThreeDScene): self.add_fixed_in_frame_mobjects(text) text.move_to(3*(DOWN+RIGHT)) self.play(Write(text)) + self.play(ShowCreation(o_line1), ShowCreation(o_tip1)) self.wait(2) self.play(FadeOut(a_line_c1), FadeOut(a_tip_c1), @@ -266,7 +268,7 @@ class Algo(ThreeDScene): last_a_tip.set_fill(PURPLE_E) last_a_tip.set_color(PURPLE_E) - self.wait() + self.wait(5) text = TextMobject(r"Take projection on $\alpha_2$") text.scale(0.6) text.set_color(GOLD_E) @@ -283,7 +285,7 @@ class Algo(ThreeDScene): self.add_fixed_in_frame_mobjects(text) text.move_to(3*DOWN+3.5*RIGHT) self.play(Write(text)) - self.play(ShowCreation(o_line1), ShowCreation(o_tip1)) + #self.play(ShowCreation(o_line1), ShowCreation(o_tip1)) self.wait(2) self.play(ShowCreation(last_a_tip), ShowCreation(last_a)) self.wait() @@ -299,16 +301,16 @@ class Algo(ThreeDScene): self.play(FadeOut(o_line1), FadeOut(o_tip1), FadeOut(a_line1_c1), FadeOut(a_tip1_c1), Transform(last_a,larrow3), Transform(last_a_tip,ltip3)) text = TextMobject(r"Normalize, the vector") - text1 = TextMobject(r"$\beta_3$-(projection of $\beta_3$ on $\alpha_1$ + projection of $\beta_3$ on $\alpha_2$") + text1 = TextMobject(r"$\beta_3$-(projection of $\beta_3$ on $\alpha_1$ + projection of $\beta_3$ on $\alpha_2)$") text.set_color(PURPLE_E) text1.set_color(PURPLE_E) - text.scale(0.6) - text1.scale(0.6) + text.scale(0.55) + text1.scale(0.55) self.add_fixed_in_frame_mobjects(text) - self.add_fixed_in_frame_mobjects(text1) text.move_to(3*DOWN+3*RIGHT) - text1.move_to(3.5*DOWN+3*RIGHT) + text1.move_to(3.5*DOWN+3.25*RIGHT) self.play(Write(text)) + self.add_fixed_in_frame_mobjects(text1) self.play(Write(text1)) arrow3 = Line(start = ORIGIN,end = [0,0,1]) @@ -330,4 +332,4 @@ class Algo(ThreeDScene): text.move_to(3*DOWN+3.5*RIGHT) self.play(Write(text)) - self.wait(3)
\ No newline at end of file + self.wait(8) diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file4_Non_Standard_Basis.py b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file4_Non_Standard_Basis.py new file mode 100644 index 0000000..1d23aa2 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file4_Non_Standard_Basis.py @@ -0,0 +1,69 @@ +from manimlib.imports import * + +class NSB(ThreeDScene): + def construct(self): + + line1 = Line(start = ORIGIN,end = 1*RIGHT) + line1.set_color(DARK_BLUE) + tip1 = Polygon(RIGHT,0.9*RIGHT-0.1*DOWN,0.9*RIGHT-0.1*UP) + tip1.set_opacity(1) + tip1.set_fill(DARK_BLUE) + tip1.set_color(DARK_BLUE) + + arrow2 = Line(start = ORIGIN,end = 1*UP) + arrow2.set_color(DARK_BLUE) + tip2 = Polygon(UP,0.9*UP-0.1*RIGHT,0.9*UP-0.1*LEFT) + tip2.set_opacity(1) + tip2.set_fill(DARK_BLUE) + tip2.set_color(DARK_BLUE) + arrow2.set_color(DARK_BLUE) + + arrow3 = Line(start = ORIGIN,end = [0,0,1]) + arrow3.set_color(DARK_BLUE) + tip3 = Polygon([0,0,1],[0,0,0.9]-0.1*RIGHT,[0,0,0.9]-0.1*LEFT) + tip3.set_opacity(1) + tip3.set_fill(DARK_BLUE) + tip3.set_color(DARK_BLUE) + + axes = ThreeDAxes(x_min = -3,x_max=3,y_min=-3,y_max=3,z_min=-3,z_max=3) + self.play(ShowCreation(axes)) + self.move_camera(phi=70*DEGREES,theta=0*DEGREES,run_time=3) + self.begin_ambient_camera_rotation(rate=0.2) + + #matrix = [[1,0,0],[0,1,0],[0,0,1]] + matrix = [[0.70710678118,-0.57735026919,-0.57735026919],[0.70710678118,0.57735026919,0.57735026919],[0,-0.57735026919,0.57735026919]] + matrix1 = [[0.70710678118,0,0],[0.70710678118,1,0],[0,0,1]] + + matrix1 = [[0.70710678118,-0.70710678118,0],[0.70710678118,0.70710678118,0],[0,0,1]] + matrix2 = [[1,0,0],[0,0.70710678118,0.70710678118],[0,-0.70710678118,0.70710678118]] + + + line1.apply_matrix(matrix1) + tip1.apply_matrix(matrix1) + arrow2.apply_matrix(matrix1) + tip2.apply_matrix(matrix1) + arrow3.apply_matrix(matrix1) + tip3.apply_matrix(matrix1) + + line1.apply_matrix(matrix2) + tip1.apply_matrix(matrix2) + arrow2.apply_matrix(matrix2) + tip2.apply_matrix(matrix2) + arrow3.apply_matrix(matrix2) + tip3.apply_matrix(matrix2) + + self.play(ShowCreation(line1), + ShowCreation(tip1), + ShowCreation(arrow2), + ShowCreation(tip2), + ShowCreation(arrow3), + ShowCreation(tip3)) + + text = TextMobject(r"This is also a set of Orthonormal Vectors") + text.set_color(DARK_BLUE) + self.add_fixed_in_frame_mobjects(text) + text.scale(0.6) + text.move_to(3*DOWN+3.5*RIGHT) + self.play(Write(text)) + + self.wait(22) diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file5.gif b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file5.gif Binary files differnew file mode 100644 index 0000000..cdc0f2d --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file5.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file6.gif b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file6.gif Binary files differnew file mode 100644 index 0000000..e03f265 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file6.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file7.gif b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file7.gif Binary files differnew file mode 100644 index 0000000..19a13dd --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file7.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file8.gif b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file8.gif Binary files differnew file mode 100644 index 0000000..0ef4551 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file8.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/README.md b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/README.md new file mode 100644 index 0000000..2a46424 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/README.md @@ -0,0 +1,30 @@ +# Contributer: Archit Sangal +My Github Account : <a href="https://github.com/architsangal">architsangal</a> (https://github.com/architsangal) +<br/></br> + +## Sub-Topics Covered: ++ Linear Transformations (Linear Maps) + +#### Video 1: Visually understanding linear transformation(using grid) + + +#### Video 2: Linear Transformation when form 1 is given + + +#### Video 3: Matrix Representation Of Linear Transformation + + +#### Video 4: Understand Linear Transformations visually + + +#### Video 5: Uniform Scaling + + +#### Fig.1 Horizontal Shear + + +#### Fig.2 Vertical Shear + + +#### Video 6: Rotation by an angle of in anticlockwise direction +
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt deleted file mode 100644 index cae98ce..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file.txt +++ /dev/null @@ -1,3 +0,0 @@ -file 'text.mp4' -file 'LinearTransformation.mp4' -file 'NonLinearTransformation.mp4' diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file10.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file10.gif Binary files differnew file mode 100644 index 0000000..d996130 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file10.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file11.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file11.gif Binary files differnew file mode 100644 index 0000000..d8c64b7 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file11.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file12.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file12.gif Binary files differnew file mode 100644 index 0000000..92bdff6 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file12.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file13.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file13.gif Binary files differnew file mode 100644 index 0000000..ba6c156 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file13.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file14.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file14.gif Binary files differnew file mode 100644 index 0000000..fd9bc7b --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file14.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py index 677f890..0182bd9 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file1_transformations.py @@ -2,16 +2,20 @@ from manimlib.imports import * class text(Scene): def construct(self): - text1 = TextMobject("For a grid, undergoing a linear transformation, all it's straight lines") + text1 = TextMobject("For a grid, undergoing a linear transformation, all its straight lines") text1.scale(0.9) text2 = TextMobject("must either remain straight lines or sends to a point in the grid formed") text2.scale(0.9) + text3 = TextMobject("Origin must remain where it was before transformation.") + text3.scale(0.9) text1.move_to(ORIGIN+UP) text2.move_to(ORIGIN) + text3.move_to(ORIGIN+DOWN) self.play(Write(text1)) self.play(Write(text2)) + self.play(Write(text3)) self.wait() - self.play(FadeOut(text1),FadeOut(text2)) + self.play(FadeOut(text1),FadeOut(text2),FadeOut(text3)) class LinearTransformation(LinearTransformationScene): CONFIG = { @@ -34,6 +38,7 @@ class NonLinearTransformation(Scene): def construct(self): grid = NumberPlane() self.play(ShowCreation(grid),run_time =2) + # I have taken reference from purusharth's code NonLinearTrans = lambda coordinates : coordinates + np.array([np.sin(coordinates[1]),np.sin(coordinates[0]),0,]) grid.prepare_for_nonlinear_transform() self.play(grid.apply_function,NonLinearTrans) @@ -42,4 +47,27 @@ class NonLinearTransformation(Scene): text[1].move_to(1.5*DOWN+4*LEFT) text.add_background_rectangle() self.play(Write(text)) - self.wait()
\ No newline at end of file + self.wait() + +class MoveOrigin(LinearTransformationScene): + + CONFIG = { + "show_basis_vectors": False, + } + def construct(self): + self.wait() + + dot = Dot(ORIGIN, color = YELLOW) + self.add_transformable_mobject(dot) + self.apply_nonlinear_transformation(self.func) + text = TextMobject("This is also not a linear transformation as the origin moves from its original position") + text.move_to(2*DOWN) + text.scale(0.5) + text.set_color(YELLOW) + text.add_background_rectangle() + self.play(Write(text)) + self.wait() + + def func(self, point): + matrix_transform = self.get_matrix_transformation([[1, -1], [1, 1]]) + return matrix_transform(point) + UP+ RIGHT diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file_before_matrix.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_before_matrix.py index 96e456d..1f6badd 100755 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file_before_matrix.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_before_matrix.py @@ -69,7 +69,7 @@ class Linear(GraphScene): class withgrid(LinearTransformationScene): def construct(self): - heading = TextMobject(r"Now, Imagine this happening for all the vectors") + heading = TextMobject(r"Now, imagine this happening for all the points") heading.scale(0.5) heading.move_to(UP*2.5+LEFT*4) self.play(Write(heading)) @@ -141,6 +141,7 @@ class ThreeDExplanation(ThreeDScene): text = TextMobject(r"$T(x,y) = (x+y,x-y,x+2y)$") text.scale(0.75) text.move_to(UP*2.5+LEFT*4) + text.move_to(-UP*3+LEFT*4) self.add_fixed_in_frame_mobjects(text) self.play(Write(text)) self.wait() @@ -218,15 +219,15 @@ class ThreeDExplanation(ThreeDScene): self.wait(3) self.stop_ambient_camera_rotation() - ending = TextMobject(r"$T(\left[\begin{array}{c}x \\ y\end{array}\right]) = \left[\begin{array}{c} x+y \\ x-y \\ x+2y \end{array}\right]$") + ending = TextMobject(r"$T(\left[\begin{array}{c}x \\ y\end{array}\right])$ = ",r"$\left[\begin{array}{c} x+y \\ x-y\\ x+2y \end{array}\right]$") #\begin{array}{c} x+y \\ x-y -- \\ x+2y -- \end{array}\right]$") ending.scale(0.75) - ending.move_to(-UP*2+LEFT*4) - self.play(Transform(text,ending)) + ending.move_to(-UP*3+LEFT*4) self.add_fixed_in_frame_mobjects(ending) + self.play(FadeOut(text),Write(ending)) self.play(FadeOut(plane)) - self.wait(3) + self.wait(2) - self.begin_ambient_camera_rotation(rate=0.5) - self.wait(5) + self.begin_ambient_camera_rotation(rate=0.3) + self.wait(8) self.stop_ambient_camera_rotation() diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/square.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_square.py index e828de4..e828de4 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/square.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_square.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Understand_Linear_Transformations_visually.py index 577032d..577032d 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file2_Understand_Linear_Transformations_visually.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Understand_Linear_Transformations_visually.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Uniform_Scaling.py index a7856a5..a7856a5 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file3_Uniform_Scaling.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Uniform_Scaling.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_Horizontal_Shear.py index 91f098e..91f098e 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_Horizontal_Shear.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_Horizontal_Shear_gif.gif Binary files differindex 9bef1b6..9bef1b6 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file4_Horizontal_Shear_gif.gif +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_Horizontal_Shear_gif.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file7_Vertical_Shear.py index 718e4e0..718e4e0 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file7_Vertical_Shear.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file7_Vertical_Shear_gif.gif Binary files differindex 7ca323f..7ca323f 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file5_Vertical_Shear_gif.gif +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file7_Vertical_Shear_gif.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file8_linear_transformation.py index 01a0cef..01a0cef 100755 --- a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file6_linear_transformation.py +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file8_linear_transformation.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file9.gif b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file9.gif Binary files differnew file mode 100644 index 0000000..017e0c7 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Linear-Transformations-(Linear-Maps)/file9.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md new file mode 100644 index 0000000..e287fa1 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md @@ -0,0 +1,15 @@ +# Contributer: Archit Sangal +My Github Account : <a href="https://github.com/architsangal">architsangal</a> (https://github.com/architsangal) +<br/></br> + +## Sub-Topics Covered: ++ Orthonormal Bases + +#### Video 1: Example of Orthonormal bases + + +#### Video 2: Adding the projections of a vector on orthonormal basis will produce the same vector + + +#### Video 3: Relating the example and the property +
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file1_orthogonal.py index a5d96f5..a5d96f5 100755 --- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file1_orthogonal.py diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file2_sum_of_projections_part1.py b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py index 81a0888..141e99b 100755 --- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file2_sum_of_projections_part1.py +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py @@ -43,7 +43,7 @@ class LinearTrans(LinearTransformationScene): text3.add_background_rectangle()
self.play(ShowCreation(arrow),Write(text3))
self.wait()
- v_cor = TextMobject("(1,3)")
+ v_cor = TextMobject("(1 , 3)")
v_cor.move_to(3.2*UP+1.3*RIGHT)
v_cor.set_color(BLUE)
v_cor.scale(0.75)
@@ -71,7 +71,7 @@ class LinearTrans(LinearTransformationScene): v1_cor.add_background_rectangle()
self.play(Write(v1_cor))
self.wait(0.5)
- text1 = TextMobject(r"(1.8,2.4)")
+ text1 = TextMobject("(1.8 , 2.4)")
text1.move_to(2.1*UP+2.5*RIGHT)
text1.scale(0.75)
text1.set_color("#6B8E23")
@@ -95,7 +95,7 @@ class LinearTrans(LinearTransformationScene): v2_cor.add_background_rectangle()
self.play(Write(v2_cor))
self.wait(0.5)
- text2 = TextMobject(r"(-0.8,0.6)")
+ text2 = TextMobject("(-0.8 , 0.6)")
text2.move_to(0.75*UP+1.75*LEFT)
text2.scale(0.75)
text2.set_color("#8b0000")
diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file3_sum_of_projections_part2.py b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py index 9d25192..2899286 100644 --- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file3_sum_of_projections_part2.py +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py @@ -3,12 +3,6 @@ class ThreeDExplanation(ThreeDScene): def construct(self): - text = TextMobject("Let us consider the example discussed above again. These are the things we know:-") - text.scale(0.75) - self.add_fixed_in_frame_mobjects(text) - text.move_to(3*UP) - self.play(Write(text)) - self.wait(2) basis = TextMobject(r"Set of Orthonormal Basis - $\left(\begin{array}{c}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\\0\end{array}\right),\left(\begin{array}{c}\frac{-1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\\0\end{array}\right),\left(\begin{array}{c}0\\0\\1\end{array}\right)$") basis.scale(0.75) basis.move_to(UP*1.5) @@ -31,7 +25,7 @@ class ThreeDExplanation(ThreeDScene): self.play(Write(eq2)) self.play(Write(eq3)) self.wait() - self.play(FadeOut(text), FadeOut(basis), FadeOut(eq), FadeOut(v), FadeOut(eq1), FadeOut(eq2), FadeOut(eq3)) + self.play(FadeOut(basis), FadeOut(eq), FadeOut(v), FadeOut(eq1), FadeOut(eq2), FadeOut(eq3)) self.wait() text = TextMobject("These are the 3 mutually orthonormal basis of the set(", r"$v_1$, ", r"$v_2$, ", r"$v_3$",")") @@ -44,13 +38,20 @@ class ThreeDExplanation(ThreeDScene): self.play(Write(text)) self.wait() - axes = ThreeDAxes(x_min = -9,x_max=9,y_min=-9,y_max=9,z_min=-9,z_max=9) + axes = ThreeDAxes(x_min = -6,x_max=6,y_min=-6,y_max=6,z_min=-6,z_max=6) self.play(ShowCreation(axes)) - self.move_camera(distance = 100, phi=30*DEGREES,theta=45*DEGREES,run_time=3) - self.begin_ambient_camera_rotation(rate=0.3) - - dashedline1 = DashedLine(start = -12*(UP+RIGHT), end = 12*(UP+RIGHT)) - dashedline2 = DashedLine(start = -12*(UP+LEFT), end = 12*(UP+LEFT)) + self.move_camera(distance = 100, phi=45*DEGREES,theta=45*DEGREES,run_time=5) + self.begin_ambient_camera_rotation(rate=0.1) + + xy_plane = Polygon(6*RIGHT+6*UP,-6*RIGHT+6*UP,-6*RIGHT-6*UP,6*RIGHT-6*UP) + xy_plane.set_color("#333333") + xy_plane.set_fill("#333333") + xy_plane.set_opacity(1) + xy_plane.fade(0.7) + self.play(ShowCreation(xy_plane)) + + dashedline1 = DashedLine(start = -6*(UP+RIGHT), end = 6*(UP+RIGHT)) + dashedline2 = DashedLine(start = -6*(UP+LEFT), end = 6*(UP+LEFT)) dashedline3 = DashedLine(start = 4*UP+3*RIGHT+[0,0,5], end = 3.5*UP+3.5*RIGHT) dashedline4 = DashedLine(start = 4*UP+3*RIGHT+[0,0,5], end = 0.5*UP+0.5*LEFT) dashedline5 = DashedLine(start = 4*UP+3*RIGHT+[0,0,5], end = [0,0,5]) @@ -95,15 +96,17 @@ class ThreeDExplanation(ThreeDScene): a_line = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) a_line.set_color(GOLD_E) - a_tip = Polygon(4*UP+3*RIGHT+[0,0,5],3.6*UP+2.7*RIGHT+[0,0,4.5]+0.1*UP+0.1*LEFT,3.6*UP+2.7*RIGHT+[0,0,4.5]+0.1*DOWN+0.1*RIGHT) + a_tip = Polygon(3.92*UP+2.94*RIGHT+[0,0,4.9],3.6*UP+2.7*RIGHT+[0,0,4.5]+0.1*UP+0.1*LEFT,3.6*UP+2.7*RIGHT+[0,0,4.5]+0.1*DOWN+0.1*RIGHT) a_tip.set_opacity(1) a_tip.set_fill(GOLD_E) a_tip.set_color(GOLD_E) self.play(ShowCreation(a_line), ShowCreation(a_tip)) - self.wait(9) + self.stop_ambient_camera_rotation() + self.move_camera(distance = 100, phi=45*DEGREES,theta=135*DEGREES,run_time=5) + self.play(ShowCreation(dashedline3),ShowCreation(dashedline4),ShowCreation(dashedline5)) - self.wait(6) + self.wait() pv1 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) pv1.set_color(GOLD_E) @@ -142,13 +145,18 @@ class ThreeDExplanation(ThreeDScene): v3_p = Line(start = ORIGIN,end = [0,0,5]) v3_p.set_color(YELLOW_E) - v3_p_tip = Polygon([0,0,5],[0,0,4.8]+0.2*RIGHT,[0,0,4.8]+0.2*LEFT) + v3_p_tip = Polygon([0,0,5.15],[0,0,4.8]+0.2*RIGHT,[0,0,4.8]+0.2*LEFT) v3_p_tip.set_opacity(1) v3_p_tip.set_fill(YELLOW_E) v3_p_tip.set_color(YELLOW_E) - self.stop_ambient_camera_rotation() - self.play(Transform(pv1,v1_p), Transform(pv1tip,v1_p_tip), Transform(pv2,v2_p), Transform(pv2tip,v2_p_tip), Transform(pv3,v3_p), Transform(pv3tip,v3_p_tip)) + #self.stop_ambient_camera_rotation() + self.play(Transform(pv1,v1_p), + Transform(pv1tip,v1_p_tip), + Transform(pv2,v2_p), + Transform(pv2tip,v2_p_tip), + Transform(pv3,v3_p), + Transform(pv3tip,v3_p_tip)) self.play(FadeOut(dashedline1), FadeOut(dashedline2), FadeOut(dashedline3), diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file4.gif b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file4.gif Binary files differnew file mode 100644 index 0000000..4891350 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file4.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif Binary files differnew file mode 100644 index 0000000..d7eb0bc --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file5.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif Binary files differnew file mode 100644 index 0000000..1df6413 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file6.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/README.md b/FSF-2020/linear-algebra/linear-transformations/README.md index 692201e..067755e 100644 --- a/FSF-2020/linear-algebra/linear-transformations/README.md +++ b/FSF-2020/linear-algebra/linear-transformations/README.md @@ -1,9 +1,10 @@ # Contributer: Archit Sangal
-My Github Account : <a href="https://github.com/architsangal">architsangal</a>
+My Github Account : <a href="https://github.com/architsangal">architsangal</a> (https://github.com/architsangal). These code were written during the course of FOSSEE Summer Fellowship 2020 under the FLOSS: Mathematics using Python.
<br/></br>
+
## Sub-Topics Covered:
-+ Vector Space Homomorphisms (Linear Maps)
++ Linear Transformations (Linear Maps)
+ The Four Fundamental Subspaces
+ Rank-Nullity Theorem
+ Orthonormal basis
-+ Gramm-Schmidt Orthogonalization Process
++ Gramm-Schmidt Orthogonalization Process
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/README.md b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/README.md new file mode 100644 index 0000000..6c90bf4 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/README.md @@ -0,0 +1,30 @@ +# Contributer: Archit Sangal +My Github Account : <a href="https://github.com/architsangal">architsangal</a> (https://github.com/architsangal) +<br/></br> + +## Sub-Topics Covered: ++ The Four Fundamental Subspaces + +#### Video 1: Writing System of linear equations in form of Ax=b + + +#### Video 2: Column Space is same as the image of Linear Transformation + + +#### Video 3: Existance of Solution w.r.t. vector b + + +#### Video 4: Null Space (Visually) + + +#### Video 5: Definition 1 is equivalent to Definition 2 + + +#### Video 6: Relation between Row Space and Null Space + + +#### Fig. 1 Naming of the left null space + + +#### Video 7: Left Null Space(Visually) +
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file10_Left_Null_Space_pSv8iio_d5Sy9qS.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file10_Left_Null_Space_pSv8iio_d5Sy9qS.gif Binary files differnew file mode 100644 index 0000000..3f50635 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file10_Left_Null_Space_pSv8iio_d5Sy9qS.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file11.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file11.gif Binary files differnew file mode 100644 index 0000000..8f74202 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file11.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file12.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file12.gif Binary files differnew file mode 100644 index 0000000..aa7403b --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file12.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file13.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file13.gif Binary files differnew file mode 100644 index 0000000..34b54c7 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file13.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file14.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file14.gif Binary files differnew file mode 100644 index 0000000..b77791b --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file14.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file15.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file15.gif Binary files differnew file mode 100644 index 0000000..8bb24bf --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file15.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file16.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file16.gif Binary files differnew file mode 100644 index 0000000..87e0026 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file16.gif diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file17.gif b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file17.gif Binary files differnew file mode 100644 index 0000000..eec819a --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file17.gif 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/file18_NOT_in_lecture_note_Column_Space.py index afe4f9a..afe4f9a 100644 --- 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/file18_NOT_in_lecture_note_Column_Space.py diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Axb.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Axb.py index 95d1021..95d1021 100755 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/Axb.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Axb.py 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 Binary files differdeleted file mode 100644 index 7d8d2e1..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file1_Column_Space.gif +++ /dev/null diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/CSasImage.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_CSasImage.py index fbb3291..70547cb 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/CSasImage.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file2_CSasImage.py @@ -3,30 +3,31 @@ 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 = TextMobject(r"$A = $",r"$\left( \begin{array}{c c} 1 & 2 \\ 3 & 4 \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) + 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 = TextMobject(r"Column Space of $A = x_{1}$",r"$\left( \begin{array}{c} 1 \\ 3 \end{array} \right)$",r"$+x_{2}$",r"$ \left( \begin{array}{c} 2 \\ 4\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) + arrow1 = Arrow(start = 1.25*UP,end = (0.25*DOWN+1.75*LEFT+0.25*DOWN+1.2*RIGHT)/2) + arrow3 = Arrow(start = 1.25*UP+0.75*RIGHT,end = (0.25*DOWN+2.9*RIGHT+0.25*DOWN)/2) + + arrow1.scale(1.5) + arrow3.scale(1.5) 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.play(Write(Defn), ShowCreation(arrow1), ShowCreation(arrow3),run_time = 1) self.wait(1) class solution(LinearTransformationScene): @@ -43,7 +44,7 @@ class solution(LinearTransformationScene): self.wait() self.play(FadeOut(o)) - A = TextMobject(r"Let $A$(= ",r"$\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$",r")denote the matrix the of this linear transformation.") + A = TextMobject(r"Let $A$ be ",r"$\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$",r". $A$ denotes the matrix the of this linear transformation.") A.move_to(2*DOWN) A.scale(0.75) A.add_background_rectangle() @@ -116,8 +117,8 @@ class solution2nd(LinearTransformationScene): arrow2 = Arrow(start = ORIGIN,end = UP+LEFT) arrow3 = Arrow(start = ORIGIN,end = 3*UP+4*RIGHT) arrow1.set_color(YELLOW) - arrow2.set_color(YELLOW) - arrow3.set_color(YELLOW) + arrow2.set_color(ORANGE) + arrow3.set_color(PURPLE) arrow1.scale(1.3) arrow2.scale(1.5) arrow3.scale(1.1) @@ -135,7 +136,7 @@ class solution2nd(LinearTransformationScene): self.wait() self.play(FadeOut(o)) - A = TextMobject(r"Matrix the of this linear transformation is $A$(= ",r"$\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$",r") again.") + A = TextMobject(r"Let the matrix the of this linear transformation be $A$ =",r"$\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$",r" again.") A.move_to(2*DOWN) A.scale(0.75) A.add_background_rectangle() diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/solution.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file3_solution.py index fb31881..eb310f3 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/solution.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file3_solution.py @@ -5,16 +5,16 @@ class solution(LinearTransformationScene): self.setup() self.wait() - o = TextMobject(r"This is the original $2D$ vector space(before Linear Transformation)") - o.move_to(DOWN) + o = TextMobject(r"This is the original vector space $R^2$ (before Linear Transformation)") + o.move_to(3*DOWN) o.scale(0.75) o.add_background_rectangle() self.play(Write(o)) self.wait() self.play(FadeOut(o)) - A = TextMobject("Let $A$ denote the matrix the of this linear transformation.") - A.move_to(DOWN) + A = TextMobject(r"Consider the matrix the of this linear transformation $A$ = $\left[\begin{array}{c c} 1 & -1 \\ 1 & -1 \end{array}\right]$") + A.move_to(3*DOWN) A.scale(0.75) A.add_background_rectangle() self.play(Write(A)) @@ -23,8 +23,8 @@ class solution(LinearTransformationScene): self.wait() self.play(FadeOut(A)) - o = TextMobject(r"This is the transformed vector space i.e. a line ($1D$)") - o.move_to(DOWN) + o = TextMobject(r"This is the transformed vector space") + o.move_to(3*DOWN) o.scale(0.75) o.add_background_rectangle() self.play(Write(o)) @@ -32,15 +32,16 @@ class solution(LinearTransformationScene): self.play(FadeOut(o)) arrow2 = Arrow(start = ORIGIN, end = 2*DOWN+2*LEFT) - arrow2.set_color(DARK_BLUE) + arrow2.set_color(PURPLE) arrow2.scale(1.2) self.play(ShowCreation(arrow2)) self.wait() - o1 = TextMobject("If the vector lies in the transformed vector space") + o1 = TextMobject("If the ","vector b"," lies in the transformed vector space") o2 = TextMobject("(the line) then the solution exist") - o1.move_to(2*DOWN+2*RIGHT) - o2.move_to(2.5*DOWN+2*RIGHT) + o1.move_to(2.5*DOWN+2*RIGHT) + o1[1].set_color(PURPLE) + o2.move_to(3*DOWN+2.5*RIGHT) o1.scale(0.75) o2.scale(0.75) o1.add_background_rectangle() @@ -53,15 +54,16 @@ class solution(LinearTransformationScene): self.play(FadeOut(arrow2)) arrow1 = Arrow(start = ORIGIN, end = 2*UP+RIGHT) - arrow1.set_color(DARK_BLUE) + arrow1.set_color(ORANGE) arrow1.scale(1.3) self.play(ShowCreation(arrow1)) self.wait() - o1 = TextMobject("If the vector does lies in the transformed") + o1 = TextMobject("If the ","vector b"," does lies in the transformed") o2 = TextMobject("vector space then the does not solution exist") - o1.move_to(2*DOWN+2*RIGHT) - o2.move_to(2.5*DOWN+2*RIGHT) + o1.move_to(2.5*DOWN+2*RIGHT) + o1[1].set_color(ORANGE) + o2.move_to(3*DOWN+2.5*RIGHT) o1.scale(0.75) o2.scale(0.75) o1.add_background_rectangle() diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/null_space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file4_null_space.py index dfc3cb4..3c52677 100644 --- a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/null_space.py +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file4_null_space.py @@ -5,8 +5,8 @@ class null_space(LinearTransformationScene): self.setup() self.wait() - o = TextMobject(r"This is the original $2D$ vector space(before Linear Transformation)") - o.move_to(DOWN) + o = TextMobject(r"This is the original vector space $R^2$(before Linear Transformation)") + o.move_to(3*DOWN) o.scale(0.75) o.add_background_rectangle() self.play(Write(o)) @@ -64,7 +64,7 @@ class null_space(LinearTransformationScene): self.add_transformable_mobject(arrow6) self.add_transformable_mobject(arrow7) - o1 = TextMobject("Notice, entire set of vectors which belong to the vector") + o1 = TextMobject("Notice, entire set of vectors which belongs to the vector") o2 = TextMobject(r"subspace(Linear Span of $\left(\begin{array}{c} 1 \\ 1 \end{array}\right)$) transforms to zero") o1.move_to(2*DOWN+2.5*RIGHT) o2.move_to(2.75*DOWN+2.5*RIGHT) @@ -83,7 +83,7 @@ class null_space(LinearTransformationScene): self.play(FadeOut(o1), FadeOut(o2)) o = TextMobject(r"Hence, the vector space formed by linear span of $\left(\begin{array}{c} 1 \\ 1 \end{array}\right)$ is the null space of $A$") - o.move_to(DOWN) + o.move_to(3*DOWN) o.scale(0.75) o.add_background_rectangle() self.play(Write(o)) diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file5_Row_Space_part_1.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file5_Row_Space_part_1.py new file mode 100644 index 0000000..5259eb4 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file5_Row_Space_part_1.py @@ -0,0 +1,68 @@ +from manimlib.imports import * +class LS(Scene): + def construct(self): + text1 = TextMobject(r"Consider a matrix $A =$") + text2 = TextMobject(r"[") + text3 = TextMobject(r"$\begin{array}{c c} 1 & -2\end{array}$") + text4 = TextMobject(r"$\begin{array}{c c} 1 & -1\end{array}$") + text5 = TextMobject(r"]") + + text2.scale(2) + text5.scale(2) + + text1.set_color(DARK_BLUE) + text2.set_color(DARK_BLUE) + text3.set_color(PURPLE) + text4.set_color(YELLOW) + text5.set_color(DARK_BLUE) + + text1.move_to(3.5*LEFT+3*UP+2*RIGHT) + text2.move_to(0.75*LEFT+3*UP+2*RIGHT) + text3.move_to(3.25*UP+2*RIGHT) + text4.move_to(2.75*UP+2*RIGHT) + text5.move_to(0.75*RIGHT+3*UP+2*RIGHT) + + self.play(FadeIn(text1), FadeIn(text2), FadeIn(text3), FadeIn(text4), FadeIn(text5)) + self.wait() + + ttext1 = TextMobject(r"$A^T =$") + ttext2 = TextMobject(r"[") + ttext3 = TextMobject(r"$\begin{array}{c} 1 \\ -2\end{array}$") + ttext4 = TextMobject(r"$\begin{array}{c} 1 \\ -1\end{array}$") + ttext5 = TextMobject(r"]") + + ttext2.scale(2) + ttext5.scale(2) + + ttext1.set_color(DARK_BLUE) + ttext2.set_color(DARK_BLUE) + ttext3.set_color(PURPLE) + ttext4.set_color(YELLOW) + ttext5.set_color(DARK_BLUE) + + ttext1.move_to(2*LEFT+1.5*UP+2*RIGHT) + ttext2.move_to(1*LEFT+1.5*UP+2*RIGHT) + ttext3.move_to(0.5*LEFT+1.5*UP+2*RIGHT) + ttext4.move_to(0.5*RIGHT+1.5*UP+2*RIGHT) + ttext5.move_to(1*RIGHT+1.5*UP+2*RIGHT) + + self.play(FadeIn(ttext1), FadeIn(ttext2), FadeIn(ttext3), FadeIn(ttext4), FadeIn(ttext5)) + + rtext = TextMobject(r"Row Space of $A$ = Column Space of $A^T = a_1$",r"$\left[\begin{array}{c} 1 \\ -2\end{array}\right]$",r"$+a_2$",r"$\left[\begin{array}{c} 1 \\ -1\end{array}\right]$") + rtext[1].set_color(PURPLE) + rtext[3].set_color(YELLOW) + rtext.move_to(2*DOWN+1.5*LEFT) + rtext.scale(0.75) + + self.play(Write(rtext)) + self.wait() + + arrow1 = Arrow(start = 1.5*RIGHT+UP, end = 1.25*(DOWN+RIGHT)) + arrow2 = Arrow(start = 2.5*RIGHT+UP, end = 1.25*DOWN+3.25*RIGHT) + arrow1.scale(1.25) + arrow2.scale(1.25) + arrow1.set_color(PURPLE) + arrow2.set_color(YELLOW) + + self.play(ShowCreation(arrow1), ShowCreation(arrow2)) + self.wait(2) 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/file6_Row_Space_part_2.py index b16a32a..b16a32a 100644 --- 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/file6_Row_Space_part_2.py diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file7_Row_space_Orthogonal_Complements.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file7_Row_space_Orthogonal_Complements.py new file mode 100644 index 0000000..c81d370 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file7_Row_space_Orthogonal_Complements.py @@ -0,0 +1,150 @@ +from manimlib.imports import * +class row_space(LinearTransformationScene): + def construct(self): + + self.setup() + self.wait() + + o = TextMobject(r"This is the original vector space $R^2$(before Linear Transformation)") + o.move_to(DOWN) + o.scale(0.75) + o.add_background_rectangle() + self.play(Write(o)) + self.wait() + self.play(FadeOut(o)) + + o1 = TextMobject("Consider a set of vectors which are linear") + o2 = TextMobject(r"span of a $\left(\begin{array}{c} 1 \\ 1 \end{array}\right)$i.e. the null space.") + o1.move_to(2*DOWN+3*RIGHT) + o2.move_to(2.75*DOWN+3*RIGHT) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + + arrow = Arrow(start = ORIGIN, end = UP+RIGHT) + arrow.set_color(YELLOW) + arrow1 = Arrow(start = ORIGIN, end = 2*(UP+RIGHT)) + arrow1.set_color(YELLOW) + arrow2 = Arrow(start = ORIGIN, end = 3*(UP+RIGHT)) + arrow2.set_color(YELLOW) + arrow3 = Arrow(start = ORIGIN, end = 4*(UP+RIGHT)) + arrow3.set_color(YELLOW) + arrow4 = Arrow(start = ORIGIN, end = DOWN+LEFT) + arrow4.set_color(YELLOW) + arrow5 = Arrow(start = ORIGIN, end = 2*(DOWN+LEFT)) + arrow5.set_color(YELLOW) + arrow6 = Arrow(start = ORIGIN, end = 3*(DOWN+LEFT)) + arrow6.set_color(YELLOW) + arrow7 = Arrow(start = ORIGIN, end = 4*(DOWN+LEFT)) + arrow7.set_color(YELLOW) + + arrow.scale(1.5) + arrow1.scale(1.2) + arrow2.scale(1.15) + arrow3.scale(1.1) + arrow4.scale(1.5) + arrow5.scale(1.2) + arrow6.scale(1.15) + arrow7.scale(1.1) + + self.play(ShowCreation(arrow), + ShowCreation(arrow1), + ShowCreation(arrow2), + ShowCreation(arrow3), + ShowCreation(arrow4), + ShowCreation(arrow5), + ShowCreation(arrow6), + ShowCreation(arrow7), + ) + + self.wait(2) + self.play(FadeOut(o1), FadeOut(o2)) + + o1 = TextMobject("Consider a set of vectors which are linear") + o2 = TextMobject(r"span of a $\left(\begin{array}{c} 1 \\ -1 \end{array}\right)$i.e. the row space.") + o1.move_to(2*DOWN+3*RIGHT) + o2.move_to(2.75*DOWN+3*RIGHT) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + + rarrow = Arrow(start = ORIGIN, end = -UP+RIGHT) + rarrow.set_color(PURPLE) + rarrow1 = Arrow(start = ORIGIN, end = 2*(-UP+RIGHT)) + rarrow1.set_color(PURPLE) + rarrow2 = Arrow(start = ORIGIN, end = 3*(-UP+RIGHT)) + rarrow2.set_color(PURPLE) + rarrow3 = Arrow(start = ORIGIN, end = 4*(-UP+RIGHT)) + rarrow3.set_color(PURPLE) + rarrow4 = Arrow(start = ORIGIN, end = -DOWN+LEFT) + rarrow4.set_color(PURPLE) + rarrow5 = Arrow(start = ORIGIN, end = 2*(-DOWN+LEFT)) + rarrow5.set_color(PURPLE) + rarrow6 = Arrow(start = ORIGIN, end = 3*(-DOWN+LEFT)) + rarrow6.set_color(PURPLE) + rarrow7 = Arrow(start = ORIGIN, end = 4*(-DOWN+LEFT)) + rarrow7.set_color(PURPLE) + + rarrow.scale(1.5) + rarrow1.scale(1.2) + rarrow2.scale(1.15) + rarrow3.scale(1.1) + rarrow4.scale(1.5) + rarrow5.scale(1.2) + rarrow6.scale(1.15) + rarrow7.scale(1.1) + + self.play(ShowCreation(rarrow), + ShowCreation(rarrow1), + ShowCreation(rarrow2), + ShowCreation(rarrow3), + ShowCreation(rarrow4), + ShowCreation(rarrow5), + ShowCreation(rarrow6), + ShowCreation(rarrow7), + ) + + self.wait(2) + self.play(FadeOut(o1), FadeOut(o2)) + + self.add_transformable_mobject(arrow) + self.add_transformable_mobject(arrow1) + self.add_transformable_mobject(arrow2) + self.add_transformable_mobject(arrow3) + self.add_transformable_mobject(arrow4) + self.add_transformable_mobject(arrow5) + self.add_transformable_mobject(arrow6) + self.add_transformable_mobject(arrow7) + + self.add_transformable_mobject(rarrow) + self.add_transformable_mobject(rarrow1) + self.add_transformable_mobject(rarrow2) + self.add_transformable_mobject(rarrow3) + self.add_transformable_mobject(rarrow4) + self.add_transformable_mobject(rarrow5) + self.add_transformable_mobject(rarrow6) + self.add_transformable_mobject(rarrow7) + + o1 = TextMobject("Notice, entire set of vectors which belong to the null space of $A$ transforms to zero") + o2 = TextMobject(r"and entire set of vectors which belong to the row space of $A$ transforms to column space of $A$.") + o1.move_to(2.5*DOWN) + o2.move_to(3.5*DOWN) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + self.wait() + + matrix = [[1,-1],[1,-1]] + self.apply_matrix(matrix) + self.wait(3) + + self.play(FadeOut(o1), FadeOut(o2))
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file8_Left_Null_Space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file8_Left_Null_Space.py new file mode 100755 index 0000000..fd05e75 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file8_Left_Null_Space.py @@ -0,0 +1,26 @@ +from manimlib.imports import * + +class Left_Null_Space(Scene): + def construct(self): + + A = TextMobject(r"Left Null Space of A") + A.move_to(3*UP) + defn = TextMobject(r"It is a vector space that consists of all the solution $x$ to the equation $A^{T}x=0$") + defn.move_to(2*UP) + defn.scale(0.75) + eqn1 = TextMobject(r"$A^{T}x=0 \cdots (i)$") + eqn1.move_to(UP) + self.play(Write(A), Write(defn), Write(eqn1),run_time=1) + statement = TextMobject(r"Taking transpose of eqn $(i)$") + eqn = TextMobject(r"$(A^{T}x)^{T}=0$") + eqn.move_to(DOWN) + eqn2 = TextMobject(r"$x^{T}(A^{T})^{T}=0$") + eqn2.move_to(DOWN) + eqn3 = TextMobject(r"$x^{T}A=0$") + eqn3.move_to(DOWN) + self.play(Write(statement),Write(eqn),run_time=1) + self.wait(0.5) + self.play(Transform(eqn,eqn2),run_time=1) + self.wait(0.5) + self.play(Transform(eqn,eqn3),run_time=1) + self.wait(0.5)
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file9_left_null_space.py b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file9_left_null_space.py new file mode 100644 index 0000000..61285be --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/file9_left_null_space.py @@ -0,0 +1,186 @@ +from manimlib.imports import * +class row_space(LinearTransformationScene): + def construct(self): + + self.setup() + self.wait() + + o = TextMobject(r"This is the original vector space $R^2$(before Linear Transformation)") + o.move_to(DOWN) + o.scale(0.75) + o.add_background_rectangle() + self.play(Write(o)) + self.wait() + self.play(FadeOut(o)) + + o1 = TextMobject("Consider a set of vectors which are linear") + o2 = TextMobject(r"span of a $\left(\begin{array}{c} 1 \\ 1 \end{array}\right)$i.e. the null space.") + o1.move_to(2*DOWN+3*RIGHT) + o2.move_to(2.75*DOWN+3*RIGHT) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + + arrow = Arrow(start = ORIGIN, end = UP+RIGHT) + arrow.set_color(YELLOW) + arrow1 = Arrow(start = ORIGIN, end = 2*(UP+RIGHT)) + arrow1.set_color(YELLOW) + arrow2 = Arrow(start = ORIGIN, end = 3*(UP+RIGHT)) + arrow2.set_color(YELLOW) + arrow3 = Arrow(start = ORIGIN, end = 4*(UP+RIGHT)) + arrow3.set_color(YELLOW) + arrow4 = Arrow(start = ORIGIN, end = DOWN+LEFT) + arrow4.set_color(YELLOW) + arrow5 = Arrow(start = ORIGIN, end = 2*(DOWN+LEFT)) + arrow5.set_color(YELLOW) + arrow6 = Arrow(start = ORIGIN, end = 3*(DOWN+LEFT)) + arrow6.set_color(YELLOW) + arrow7 = Arrow(start = ORIGIN, end = 4*(DOWN+LEFT)) + arrow7.set_color(YELLOW) + + arrow.scale(1.5) + arrow1.scale(1.2) + arrow2.scale(1.15) + arrow3.scale(1.1) + arrow4.scale(1.5) + arrow5.scale(1.2) + arrow6.scale(1.15) + arrow7.scale(1.1) + + self.play(ShowCreation(arrow), + ShowCreation(arrow1), + ShowCreation(arrow2), + ShowCreation(arrow3), + ShowCreation(arrow4), + ShowCreation(arrow5), + ShowCreation(arrow6), + ShowCreation(arrow7), + ) + + self.wait(2) + self.play(FadeOut(o1), FadeOut(o2)) + + o1 = TextMobject("Consider a set of vectors which are linear") + o2 = TextMobject(r"span of a vector $\left(\begin{array}{c} 1 \\ -1 \end{array}\right)$i.e. the row space.") + o1.move_to(2*DOWN+3*RIGHT) + o2.move_to(2.75*DOWN+3*RIGHT) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + + rarrow = Arrow(start = ORIGIN, end = -UP+RIGHT) + rarrow.set_color(PURPLE) + rarrow1 = Arrow(start = ORIGIN, end = 2*(-UP+RIGHT)) + rarrow1.set_color(PURPLE) + rarrow2 = Arrow(start = ORIGIN, end = 3*(-UP+RIGHT)) + rarrow2.set_color(PURPLE) + rarrow3 = Arrow(start = ORIGIN, end = 4*(-UP+RIGHT)) + rarrow3.set_color(PURPLE) + rarrow4 = Arrow(start = ORIGIN, end = -DOWN+LEFT) + rarrow4.set_color(PURPLE) + rarrow5 = Arrow(start = ORIGIN, end = 2*(-DOWN+LEFT)) + rarrow5.set_color(PURPLE) + rarrow6 = Arrow(start = ORIGIN, end = 3*(-DOWN+LEFT)) + rarrow6.set_color(PURPLE) + rarrow7 = Arrow(start = ORIGIN, end = 4*(-DOWN+LEFT)) + rarrow7.set_color(PURPLE) + + rarrow.scale(1.5) + rarrow1.scale(1.2) + rarrow2.scale(1.15) + rarrow3.scale(1.1) + rarrow4.scale(1.5) + rarrow5.scale(1.2) + rarrow6.scale(1.15) + rarrow7.scale(1.1) + + self.play(ShowCreation(rarrow), + ShowCreation(rarrow1), + ShowCreation(rarrow2), + ShowCreation(rarrow3), + ShowCreation(rarrow4), + ShowCreation(rarrow5), + ShowCreation(rarrow6), + ShowCreation(rarrow7), + ) + + self.wait(2) + self.play(FadeOut(o1), FadeOut(o2)) + + self.add_transformable_mobject(arrow) + self.add_transformable_mobject(arrow1) + self.add_transformable_mobject(arrow2) + self.add_transformable_mobject(arrow3) + self.add_transformable_mobject(arrow4) + self.add_transformable_mobject(arrow5) + self.add_transformable_mobject(arrow6) + self.add_transformable_mobject(arrow7) + + self.add_transformable_mobject(rarrow) + self.add_transformable_mobject(rarrow1) + self.add_transformable_mobject(rarrow2) + self.add_transformable_mobject(rarrow3) + self.add_transformable_mobject(rarrow4) + self.add_transformable_mobject(rarrow5) + self.add_transformable_mobject(rarrow6) + self.add_transformable_mobject(rarrow7) + + matrix = [[1,-1],[1,-1]] + self.apply_matrix(matrix) + self.wait(3) + + o1 = TextMobject("Consider a set of vectors which are linear span of a vector") + o2 = TextMobject(r"$\left(\begin{array}{c} 1 \\ -1 \end{array}\right)$ which is orthogonal to column space i.e. Left Null Space") + o1.move_to(2*DOWN) + o2.move_to(2.75*DOWN) + o1.scale(0.7) + o2.scale(0.7) + o1.add_background_rectangle() + o2.add_background_rectangle() + self.play(Write(o1)) + self.play(Write(o2)) + + rarrow = Arrow(start = ORIGIN, end = -UP+RIGHT) + rarrow.set_color(YELLOW) + rarrow1 = Arrow(start = ORIGIN, end = 2*(-UP+RIGHT)) + rarrow1.set_color(YELLOW) + rarrow2 = Arrow(start = ORIGIN, end = 3*(-UP+RIGHT)) + rarrow2.set_color(YELLOW) + rarrow3 = Arrow(start = ORIGIN, end = 4*(-UP+RIGHT)) + rarrow3.set_color(YELLOW) + rarrow4 = Arrow(start = ORIGIN, end = -DOWN+LEFT) + rarrow4.set_color(YELLOW) + rarrow5 = Arrow(start = ORIGIN, end = 2*(-DOWN+LEFT)) + rarrow5.set_color(YELLOW) + rarrow6 = Arrow(start = ORIGIN, end = 3*(-DOWN+LEFT)) + rarrow6.set_color(YELLOW) + rarrow7 = Arrow(start = ORIGIN, end = 4*(-DOWN+LEFT)) + rarrow7.set_color(YELLOW) + + rarrow.scale(1.5) + rarrow1.scale(1.2) + rarrow2.scale(1.15) + rarrow3.scale(1.1) + rarrow4.scale(1.5) + rarrow5.scale(1.2) + rarrow6.scale(1.15) + rarrow7.scale(1.1) + + self.play(ShowCreation(rarrow), + ShowCreation(rarrow1), + ShowCreation(rarrow2), + ShowCreation(rarrow3), + ShowCreation(rarrow4), + ShowCreation(rarrow5), + ShowCreation(rarrow6), + ShowCreation(rarrow7), + ) + + self.wait(2) + self.play(FadeOut(o1), FadeOut(o2)) diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/README.md b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/README.md new file mode 100644 index 0000000..9d49b4f --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/README.md @@ -0,0 +1,9 @@ +# Contributer: Archit Sangal +My Github Account : <a href="https://github.com/architsangal">architsangal</a> (https://github.com/architsangal) +<br/></br> + +## Sub-Topics Covered: ++ The Rank-Nullity Theorem + +#### Video 1: Visually understanding linear transformation(using grid) +
\ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2.gif b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2.gif Binary files differnew file mode 100644 index 0000000..46efc66 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/file2.gif |