From 350ccaf2453180475406256cc8d4c9bfe9db3880 Mon Sep 17 00:00:00 2001 From: Archit Sangal Date: Thu, 9 Jul 2020 02:59:49 +0530 Subject: updated folder name and README.md files --- .../file1_introduction.py | 33 -- .../file2_projections.py | 79 ----- .../file3_orthonormal.py | 333 --------------------- .../file4_Non_Standard_Basis.py | 51 ---- .../README.md | 18 ++ .../file1_introduction.py | 33 ++ .../file2_projections.py | 79 +++++ .../file3_orthonormal.py | 333 +++++++++++++++++++++ .../file4_Non_Standard_Basis.py | 51 ++++ .../file5.gif | Bin 0 -> 26037424 bytes .../file6.gif | Bin 0 -> 5378916 bytes .../file7.gif | Bin 0 -> 603223 bytes .../file8.gif | Bin 0 -> 1027000 bytes .../Orthonormal Basis/file1_orthogonal.py | 40 --- .../file2_sum_of_projections_part1.py | 133 -------- .../file3_sum_of_projections_part2.py | 173 ----------- .../Orthonormal-Basis/README.md | 30 ++ .../Orthonormal-Basis/file1_orthogonal.py | 40 +++ .../file2_sum_of_projections_part1.py | 133 ++++++++ .../file3_sum_of_projections_part2.py | 173 +++++++++++ .../The-Four-Fundamental-Subspaces/README.md | 30 ++ .../The-Rank-Nullity-Theorem/README.md | 30 ++ 22 files changed, 950 insertions(+), 842 deletions(-) delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file1_introduction.py delete mode 100755 FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file2_projections.py delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file3_orthonormal.py delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file4_Non_Standard_Basis.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/README.md create mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file1_introduction.py create mode 100755 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file2_projections.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file3_orthonormal.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file4_Non_Standard_Basis.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file5.gif create mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file6.gif create mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file7.gif create mode 100644 FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file8.gif delete mode 100755 FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py delete mode 100755 FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file2_sum_of_projections_part1.py delete mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file3_sum_of_projections_part2.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md create mode 100755 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file1_orthogonal.py create mode 100755 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Four-Fundamental-Subspaces/README.md create mode 100644 FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/README.md (limited to 'FSF-2020') diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file1_introduction.py b/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file1_introduction.py deleted file mode 100644 index ccd23c9..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file1_introduction.py +++ /dev/null @@ -1,33 +0,0 @@ -from manimlib.imports import * - -class Orthonormal(Scene): - def construct(self): - Centre = DOWN - arrow_1 = Arrow(start = Centre+ORIGIN,end = Centre+1.414*(UP+RIGHT)) - arrow_2 = Arrow(start = Centre+ORIGIN,end = Centre+2*UP) - arrow_1.scale(1.35) - arrow_2.scale(1.35) - text = TextMobject("This is a set of linearly independent vectors") - text.scale(0.75) - text.move_to(3*UP+3*LEFT) - text.set_color(PURPLE_E) - arrow_1.set_color(PURPLE_E) - arrow_2.set_color(PURPLE_E) - self.play(Write(text)) - self.play(ShowCreation(arrow_1), ShowCreation(arrow_2)) - self.wait(2) - text1 = TextMobject("After we apply Gram-Schmidt Orthogonalization Process to set of linearly independent vectors") - text1.scale(0.6) - text1.move_to(3*UP+2*LEFT) - text1.set_color(GREEN) - arrow_a = Arrow(start = Centre+ORIGIN,end = Centre+0.707*(UP+RIGHT)) - arrow_a.set_color(GREEN) - arrow_a.scale(2) - self.play(Transform(text,text1)) - self.wait(2) - self.play(Transform(arrow_1,arrow_a)) - arrow_b = Arrow(start = Centre+ORIGIN,end = Centre+0.707*(UP+LEFT)) - arrow_b.set_color(GREEN) - arrow_b.scale(2) - self.play(Transform(arrow_2,arrow_b)) - self.wait(2) \ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file2_projections.py b/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file2_projections.py deleted file mode 100755 index dd4b8d4..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file2_projections.py +++ /dev/null @@ -1,79 +0,0 @@ -from manimlib.imports import * - -class Projections(GraphScene): - CONFIG = { - "x_min": -6, - "x_max": 6, - "y_min": -4, - "y_max": 4, - "graph_origin" : ORIGIN , - } - def construct(self): - - self.setup_axes(animate=True) - - XTD = self.x_axis_width/(self.x_max-self.x_min) - YTD = self.y_axis_height/(self.y_max-self.y_min) - - arrow_a = Arrow(start = ORIGIN, end = 4*XTD*RIGHT) - arrow_a.scale(1.2) - arrow_a.set_color(DARK_BLUE) - arrow_b = Arrow(start = ORIGIN, end = 2*YTD*UP+2*XTD*RIGHT) - arrow_b.scale(1.3) - arrow_b.set_color(DARK_BLUE) - self.play(ShowCreation(arrow_a), ShowCreation(arrow_b)) - - text = TextMobject(r"Consider 2 linearly independent vectors $a$ and $b$") - text.set_color(DARK_BLUE) - text.scale(0.6) - text.move_to(3*YTD*UP+5*XTD*LEFT) - text_a = TextMobject("a") - text_a.move_to(0.4*YTD*DOWN+3*XTD*RIGHT) - text_a.set_color(DARK_BLUE) - text_b = TextMobject("b") - text_b.move_to(1.5*YTD*UP+RIGHT*XTD) - text_b.set_color(DARK_BLUE) - - self.play(Write(text),Write(text_a), Write(text_b)) - self.wait() - - arrow_b_copy = Arrow(start = ORIGIN, end = 2*YTD*UP+2*XTD*RIGHT) - arrow_b_copy.scale(1.25) - - arrow_p = Arrow(start = ORIGIN, end = 2*XTD*RIGHT) - arrow_p.scale(1.5) - arrow_p.set_color(GOLD_E) - - text_p = TextMobject("p") - text_p.move_to(0.25*DOWN+RIGHT) - text_p.set_color(GOLD_E) - - self.play(FadeOut(text), Transform(arrow_b_copy,arrow_p), FadeOut(text_a), FadeOut(text_b)) - text = TextMobject(r"$p$ is the projection of $b$ on $a$") - text.set_color(GOLD_E) - text.move_to(3*UP+4*LEFT) - text.scale(0.8) - self.play(Write(text),Write(text_p)) - self.wait() - - self.play(FadeIn(text_a), FadeIn(text_b)) - - arrow_o = Arrow(start = 2*XTD*RIGHT, end = 2*YTD*UP+2*XTD*RIGHT) - arrow_o.scale(1.5) - arrow_o.set_color(GREEN_E) - - text_o = TextMobject("b-p") - text_o.move_to(UP*YTD+2.7*XTD*RIGHT) - text_o.set_color(GREEN_E) - - self.play(ShowCreation(arrow_o)) - self.play(FadeOut(text),Write(text_o)) - - text = TextMobject(r"Observe, ($b-p$) is orthogonal to $a$") - text.set_color(GREEN_E) - text.move_to(2*DOWN+4*LEFT) - text.scale(0.8) - self.play(Write(text)) - self.wait(2) - - self.play(FadeOut(self.axes), FadeOut(arrow_a), FadeOut(arrow_b), FadeOut(arrow_b_copy), FadeOut(arrow_o), FadeOut(text_a), FadeOut(text_b), FadeOut(text_o), FadeOut(text_p), FadeOut(text)) \ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file3_orthonormal.py b/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file3_orthonormal.py deleted file mode 100644 index af51fc6..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file3_orthonormal.py +++ /dev/null @@ -1,333 +0,0 @@ -from manimlib.imports import * - -class Algo(ThreeDScene): - def construct(self): - - 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.set_color(GREEN) - text.scale(0.6) - text.move_to(3*UP+5*LEFT) - self.play(Write(text)) - - arrow_a = Arrow(start = ORIGIN, end = 4*RIGHT) - arrow_a.set_color(GREEN) - arrow_a.scale(1.15) - self.play(ShowCreation(arrow_a)) - - text_a = TextMobject(r"$\beta_1$") - text_a.move_to(0.4*DOWN+3*RIGHT) - text_a.set_color(GREEN) - text_a.scale(0.75) - self.play(Write(text_a)) - self.wait() - self.play(FadeOut(text)) - - text = TextMobject(r"Normalize $\beta_1$ to get $\alpha_1$") - text.set_color(DARK_BLUE) - text.scale(0.75) - text.move_to(3*UP+5*LEFT) - self.play(Write(text)) - - alpha_1 = Arrow(start = ORIGIN,end = RIGHT) - alpha_1.scale(1.9) - alpha_1.set_color(DARK_BLUE) - text_alpha_1 = TextMobject(r"$\alpha_1$") - text_alpha_1.move_to(0.4*DOWN+RIGHT) - text_alpha_1.set_color(DARK_BLUE) - text_alpha_1.scale(0.75) - self.play(Transform(text_a,text_alpha_1), Transform(arrow_a,alpha_1)) - self.wait() - self.play(FadeOut(text)) - - 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) - text.scale(0.6) - text1.scale(0.6) - text.move_to(3*UP+4*LEFT) - text1.move_to(2*UP+4*LEFT) - self.play(Write(text)) - self.play(Write(text1)) - - arrow_b = Arrow(start = ORIGIN, end = 2*UP+2*RIGHT) - arrow_b.scale(1.2) - arrow_b.set_color(GREEN) - text_b = TextMobject(r"$\beta_2$") - text_b.move_to(1.5*UP+RIGHT) - text_b.set_color(GREEN) - text_b.scale(0.75) - - self.play(ShowCreation(arrow_b), Write(text_b)) - self.wait() - - arrow_b_copy = Arrow(start = ORIGIN, end = 2*UP+2*RIGHT) - arrow_b_copy.scale(1.2) - - arrow_p = Arrow(start = ORIGIN, end = 2*RIGHT) - arrow_p.scale(1.35) - arrow_p.set_color(GOLD_E) - - text_p = TextMobject("p") - text_p.move_to(0.25*DOWN+RIGHT) - text_p.set_color(GOLD_E) - - self.play(FadeOut(text), FadeOut(text1), Transform(arrow_b_copy,arrow_p), FadeOut(text_a), FadeOut(text_b)) - text = TextMobject(r"$p$ is the projection of $\beta_2$ on $\alpha_1$") - text.set_color(GOLD_E) - text.move_to(3*UP+4*LEFT) - text.scale(0.8) - self.play(Write(text),Write(text_p)) - self.wait() - - self.play(FadeIn(text_b)) - - arrow_o = Arrow(start = 2*RIGHT, end = 2*UP+2*RIGHT) - arrow_o.scale(1.35) - arrow_o.set_color(PURPLE_E) - - text_o = TextMobject(r"$\beta_2-p$") - text_o.move_to(UP+2.7*RIGHT) - text_o.scale(0.75) - text_o.set_color(PURPLE_E) - - self.play(ShowCreation(arrow_o)) - self.play(FadeOut(text),Write(text_o)) - - text = TextMobject(r"$\beta_2-p$ is orthogonal to p") - text1 = TextMobject(r"(and hence orthogonal to $\alpha_1$ also)") - text.set_color(PURPLE_E) - text1.set_color(PURPLE_E) - text.scale(0.7) - text1.scale(0.7) - text.move_to(3*UP+4*LEFT) - text1.move_to(2.5*UP+4*LEFT) - self.play(Write(text)) - self.play(Write(text1)) - self.wait(2) - - self.play(FadeOut(text_p), FadeIn(arrow_a), FadeOut(text), FadeOut(text1), FadeOut(arrow_b_copy), FadeOut(arrow_p), FadeOut(text_b), FadeOut(arrow_b)) - self.play(ApplyMethod(arrow_o.move_to,UP), ApplyMethod(text_o.move_to,RIGHT+UP)) - - text = TextMobject(r"Now, Normalize $\beta_2-p$") - text.set_color(DARK_BLUE) - text.scale(0.6) - text.move_to(3*UP+4*LEFT) - self.play(Write(text)) - - alpha_2 = Arrow(start = ORIGIN,end = UP) - alpha_2.scale(1.9) - alpha_2.set_color(DARK_BLUE) - text_alpha_2 = TextMobject(r"$\alpha_2$") - text_alpha_2.move_to(0.4*LEFT+UP) - text_alpha_2.set_color(DARK_BLUE) - text_alpha_2.scale(0.75) - self.play(Transform(text_o,text_alpha_2), Transform(arrow_o,alpha_2), FadeIn(text_a)) - self.wait() - self.play(FadeOut(text),FadeOut(text_a),FadeOut(text_o)) - - self.add(axes) - ############################################################################# - axis = TextMobject(r"$\alpha_1$",r"$\alpha_2$",r"$\alpha_3$",r"$\beta_3$",r"$\alpha_3$",r"$\alpha_3$",r"$\alpha_3$",r"$\alpha_3$") - axis.scale(0.5) - axis[0].move_to(0.5*RIGHT+[0,0,-0.5]) - axis[1].move_to(0.5*UP+[0,0,-0.5]) - axis[2].move_to(np.array([0,0,0.5])) - axis[3].move_to(np.array([1,1,1.5])) - self.add_fixed_orientation_mobjects(axis[0]) - 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=60*DEGREES,theta=45*DEGREES,run_time=3) - self.begin_ambient_camera_rotation(rate=0.3) - - line1 = Line(start = ORIGIN,end = 1*RIGHT) - line1.set_color(DARK_BLUE) - tip1 = Polygon(RIGHT,0.8*RIGHT-0.2*DOWN,0.8*RIGHT-0.2*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.8*UP-0.2*RIGHT,0.8*UP-0.2*LEFT) - tip2.set_opacity(1) - tip2.set_fill(DARK_BLUE) - tip2.set_color(DARK_BLUE) - arrow2.set_color(DARK_BLUE) - - self.play(ShowCreation(line1), ShowCreation(tip1), ShowCreation(arrow2), ShowCreation(tip2), FadeOut(arrow_a), FadeOut(arrow_o)) - self.wait() - - a_line = Line(start = ORIGIN,end = 2*UP+2*RIGHT+[0,0,2]) - a_line.set_color(GOLD_E) - a_tip = Polygon(2*UP+2*RIGHT+[0,0,2],2*UP+1.6*RIGHT+[0,0,1.8],1.6*UP+2*RIGHT+[0,0,1.8]) - a_tip.set_opacity(1) - a_tip.set_fill(GOLD_E) - a_tip.set_color(GOLD_E) - - a_line_c1 = Line(start = ORIGIN,end = 2*UP+2*RIGHT+[0,0,2]) - a_line_c1.set_color(GOLD_E) - a_tip_c1 = Polygon(2*UP+2*RIGHT+[0,0,2],2*UP+1.6*RIGHT+[0,0,1.8],1.6*UP+2*RIGHT+[0,0,1.8]) - a_tip_c1.set_opacity(1) - 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)) - - 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) - self.add_fixed_orientation_mobjects(axis[3]) - text.move_to(3*(DOWN+RIGHT)) - self.play(Write(text)) - self.wait() - self.play(FadeOut(text)) - - 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.set_opacity(1) - p_tip1.set_fill(GOLD_E) - p_tip1.set_color(GOLD_E) - - self.play(Transform(a_line_c1,p_line1),Transform(a_tip_c1,p_tip1)) - - text = TextMobject(r"Take projection of $\beta_3$ on $\alpha_1$") - text.scale(0.6) - text.set_color(GOLD_E) - self.add_fixed_in_frame_mobjects(text) - text.move_to(3*(DOWN+RIGHT)) - self.play(Write(text)) - self.wait() - self.play(FadeOut(text)) - - o_line1 = Line(start = 2*RIGHT,end = 2*UP+2*RIGHT+[0,0,2]) - o_line1.set_color(GREEN_E) - o_tip1 = Polygon(2*UP+2*RIGHT+[0,0,2],1.8*UP+2*RIGHT+[0,0,1.8]+0.2*RIGHT,1.8*UP+2*RIGHT+[0,0,1.8]-0.2*RIGHT) - o_tip1.set_opacity(1) - o_tip1.set_fill(GREEN_E) - o_tip1.set_color(GREEN_E) - - a_line1 = Line(start = ORIGIN,end = 2*UP+[0,0,2]) - a_line1.set_color(GREEN_E) - a_tip1 = Polygon(2*UP+[0,0,2],1.8*UP+[0,0,1.8]+0.2*RIGHT,1.8*UP+[0,0,1.8]-0.2*RIGHT) - a_tip1.set_opacity(1) - a_tip1.set_fill(GREEN_E) - a_tip1.set_color(GREEN_E) - - a_line1_c1 = Line(start = ORIGIN,end = 2*UP+[0,0,2]) - a_line1_c1.set_color(GREEN_E) - a_tip1_c1 = Polygon(2*UP+[0,0,2],1.8*UP+[0,0,1.8]+0.2*RIGHT,1.8*UP+[0,0,1.8]-0.2*RIGHT) - a_tip1_c1.set_opacity(1) - a_tip1_c1.set_fill(GREEN_E) - a_tip1_c1.set_color(GREEN_E) - - text = TextMobject(r"$\beta_3$-(projection of $\beta_3$ on $\alpha_1$)") - text.set_color(GREEN_E) - text.scale(0.6) - 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), - FadeOut(a_line), FadeOut(a_tip), FadeOut(axis[3]), - Transform(o_line1,a_line1), Transform(o_tip1,a_tip1)) - - self.wait() - self.play(FadeOut(text)) - - p_arrow2 = Line(start = ORIGIN,end = 2*UP) - p_arrow2.set_color(GOLD_E) - p_tip2 = Polygon(2*UP,1.8*UP+0.2*RIGHT,1.8*UP+0.2*LEFT) - p_tip2.set_opacity(1) - p_tip2.set_fill(GOLD_E) - p_tip2.set_color(GOLD_E) - p_arrow2.set_color(GOLD_E) - - last_a = Line(start = 2*UP,end = [0,2,2]) - last_a.set_color(PURPLE_E) - last_a_tip = Polygon([0,0,2],[0,0,1.8]+0.2*RIGHT,[0,0,1.8]+0.2*LEFT) - last_a_tip.move_to([0,2,2]) - last_a_tip.set_opacity(1) - last_a_tip.set_fill(PURPLE_E) - last_a_tip.set_color(PURPLE_E) - - self.wait() - text = TextMobject(r"Take projection on $\alpha_2$") - text.scale(0.6) - text.set_color(GOLD_E) - self.add_fixed_in_frame_mobjects(text) - text.move_to(3*(DOWN+RIGHT)) - self.play(Write(text)) - self.play(Transform(a_line1_c1,p_arrow2),Transform(a_tip1_c1,p_tip2)) - self.wait() - self.play(FadeOut(text)) - - text = TextMobject(r"$\beta_3$-(projection of $\beta_3$ on $\alpha_1$ + projection of $\beta_3$ on $\alpha_2$)") - text.set_color(PURPLE_E) - text.scale(0.6) - 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.wait(2) - self.play(ShowCreation(last_a_tip), ShowCreation(last_a)) - self.wait() - self.play(FadeOut(text)) - - larrow3 = Line(start = ORIGIN,end = [0,0,2]) - larrow3.set_color(PURPLE_E) - ltip3 = Polygon([0,0,2],[0,0,1.8]+0.2*RIGHT,[0,0,1.8]+0.2*LEFT) - ltip3.set_opacity(1) - ltip3.set_fill(PURPLE_E) - ltip3.set_color(PURPLE_E) - self.wait() - 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$") - text.set_color(PURPLE_E) - text1.set_color(PURPLE_E) - text.scale(0.6) - text1.scale(0.6) - 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) - self.play(Write(text)) - self.play(Write(text1)) - - arrow3 = Line(start = ORIGIN,end = [0,0,1]) - arrow3.set_color(DARK_BLUE) - tip3 = Polygon([0,0,1],[0,0,0.8]-0.2*RIGHT,[0,0,0.8]-0.2*LEFT) - tip3.set_opacity(1) - tip3.set_fill(DARK_BLUE) - tip3.set_color(DARK_BLUE) - self.play(Transform(last_a,arrow3), Transform(last_a_tip,tip3)) - self.add_fixed_orientation_mobjects(axis[2]) - - self.wait() - self.play(FadeOut(text),FadeOut(text1)) - - text = TextMobject(r"These are the three orthonormal vectors $\alpha_1, \alpha_2, \alpha_3$") - 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(3) \ No newline at end of file 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 deleted file mode 100644 index 6410a2c..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Gram Schmidt Orthonormalization Process/file4_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..0305ba7 --- /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 : architsangal +

+ +## Sub-Topics Covered: ++ Gramm-Schmidt Orthogonalization Process + +#### Video 1: Introduction to Gram-Schmidt Orthogonalization Process +![GIF1](file7.gif) + +#### Video 2: Obtaining orthogonal vectors using projections +![GIF2](file8.gif) + +#### Video 3: Visual Explanation of how Gram-Schmidt Orthogonalization Process give mutually orthonormal vectors +![GIF3](file5.gif) + +#### Video 4: Example of Orthonormal Vectors which are different from standard basis +![GIF4](file6.gif) \ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file1_introduction.py b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file1_introduction.py new file mode 100644 index 0000000..ccd23c9 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file1_introduction.py @@ -0,0 +1,33 @@ +from manimlib.imports import * + +class Orthonormal(Scene): + def construct(self): + Centre = DOWN + arrow_1 = Arrow(start = Centre+ORIGIN,end = Centre+1.414*(UP+RIGHT)) + arrow_2 = Arrow(start = Centre+ORIGIN,end = Centre+2*UP) + arrow_1.scale(1.35) + arrow_2.scale(1.35) + text = TextMobject("This is a set of linearly independent vectors") + text.scale(0.75) + text.move_to(3*UP+3*LEFT) + text.set_color(PURPLE_E) + arrow_1.set_color(PURPLE_E) + arrow_2.set_color(PURPLE_E) + self.play(Write(text)) + self.play(ShowCreation(arrow_1), ShowCreation(arrow_2)) + self.wait(2) + text1 = TextMobject("After we apply Gram-Schmidt Orthogonalization Process to set of linearly independent vectors") + text1.scale(0.6) + text1.move_to(3*UP+2*LEFT) + text1.set_color(GREEN) + arrow_a = Arrow(start = Centre+ORIGIN,end = Centre+0.707*(UP+RIGHT)) + arrow_a.set_color(GREEN) + arrow_a.scale(2) + self.play(Transform(text,text1)) + self.wait(2) + self.play(Transform(arrow_1,arrow_a)) + arrow_b = Arrow(start = Centre+ORIGIN,end = Centre+0.707*(UP+LEFT)) + arrow_b.set_color(GREEN) + arrow_b.scale(2) + self.play(Transform(arrow_2,arrow_b)) + self.wait(2) \ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file2_projections.py b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file2_projections.py new file mode 100755 index 0000000..dd4b8d4 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file2_projections.py @@ -0,0 +1,79 @@ +from manimlib.imports import * + +class Projections(GraphScene): + CONFIG = { + "x_min": -6, + "x_max": 6, + "y_min": -4, + "y_max": 4, + "graph_origin" : ORIGIN , + } + def construct(self): + + self.setup_axes(animate=True) + + XTD = self.x_axis_width/(self.x_max-self.x_min) + YTD = self.y_axis_height/(self.y_max-self.y_min) + + arrow_a = Arrow(start = ORIGIN, end = 4*XTD*RIGHT) + arrow_a.scale(1.2) + arrow_a.set_color(DARK_BLUE) + arrow_b = Arrow(start = ORIGIN, end = 2*YTD*UP+2*XTD*RIGHT) + arrow_b.scale(1.3) + arrow_b.set_color(DARK_BLUE) + self.play(ShowCreation(arrow_a), ShowCreation(arrow_b)) + + text = TextMobject(r"Consider 2 linearly independent vectors $a$ and $b$") + text.set_color(DARK_BLUE) + text.scale(0.6) + text.move_to(3*YTD*UP+5*XTD*LEFT) + text_a = TextMobject("a") + text_a.move_to(0.4*YTD*DOWN+3*XTD*RIGHT) + text_a.set_color(DARK_BLUE) + text_b = TextMobject("b") + text_b.move_to(1.5*YTD*UP+RIGHT*XTD) + text_b.set_color(DARK_BLUE) + + self.play(Write(text),Write(text_a), Write(text_b)) + self.wait() + + arrow_b_copy = Arrow(start = ORIGIN, end = 2*YTD*UP+2*XTD*RIGHT) + arrow_b_copy.scale(1.25) + + arrow_p = Arrow(start = ORIGIN, end = 2*XTD*RIGHT) + arrow_p.scale(1.5) + arrow_p.set_color(GOLD_E) + + text_p = TextMobject("p") + text_p.move_to(0.25*DOWN+RIGHT) + text_p.set_color(GOLD_E) + + self.play(FadeOut(text), Transform(arrow_b_copy,arrow_p), FadeOut(text_a), FadeOut(text_b)) + text = TextMobject(r"$p$ is the projection of $b$ on $a$") + text.set_color(GOLD_E) + text.move_to(3*UP+4*LEFT) + text.scale(0.8) + self.play(Write(text),Write(text_p)) + self.wait() + + self.play(FadeIn(text_a), FadeIn(text_b)) + + arrow_o = Arrow(start = 2*XTD*RIGHT, end = 2*YTD*UP+2*XTD*RIGHT) + arrow_o.scale(1.5) + arrow_o.set_color(GREEN_E) + + text_o = TextMobject("b-p") + text_o.move_to(UP*YTD+2.7*XTD*RIGHT) + text_o.set_color(GREEN_E) + + self.play(ShowCreation(arrow_o)) + self.play(FadeOut(text),Write(text_o)) + + text = TextMobject(r"Observe, ($b-p$) is orthogonal to $a$") + text.set_color(GREEN_E) + text.move_to(2*DOWN+4*LEFT) + text.scale(0.8) + self.play(Write(text)) + self.wait(2) + + self.play(FadeOut(self.axes), FadeOut(arrow_a), FadeOut(arrow_b), FadeOut(arrow_b_copy), FadeOut(arrow_o), FadeOut(text_a), FadeOut(text_b), FadeOut(text_o), FadeOut(text_p), FadeOut(text)) \ No newline at end of file diff --git a/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file3_orthonormal.py b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file3_orthonormal.py new file mode 100644 index 0000000..af51fc6 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file3_orthonormal.py @@ -0,0 +1,333 @@ +from manimlib.imports import * + +class Algo(ThreeDScene): + def construct(self): + + 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.set_color(GREEN) + text.scale(0.6) + text.move_to(3*UP+5*LEFT) + self.play(Write(text)) + + arrow_a = Arrow(start = ORIGIN, end = 4*RIGHT) + arrow_a.set_color(GREEN) + arrow_a.scale(1.15) + self.play(ShowCreation(arrow_a)) + + text_a = TextMobject(r"$\beta_1$") + text_a.move_to(0.4*DOWN+3*RIGHT) + text_a.set_color(GREEN) + text_a.scale(0.75) + self.play(Write(text_a)) + self.wait() + self.play(FadeOut(text)) + + text = TextMobject(r"Normalize $\beta_1$ to get $\alpha_1$") + text.set_color(DARK_BLUE) + text.scale(0.75) + text.move_to(3*UP+5*LEFT) + self.play(Write(text)) + + alpha_1 = Arrow(start = ORIGIN,end = RIGHT) + alpha_1.scale(1.9) + alpha_1.set_color(DARK_BLUE) + text_alpha_1 = TextMobject(r"$\alpha_1$") + text_alpha_1.move_to(0.4*DOWN+RIGHT) + text_alpha_1.set_color(DARK_BLUE) + text_alpha_1.scale(0.75) + self.play(Transform(text_a,text_alpha_1), Transform(arrow_a,alpha_1)) + self.wait() + self.play(FadeOut(text)) + + 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) + text.scale(0.6) + text1.scale(0.6) + text.move_to(3*UP+4*LEFT) + text1.move_to(2*UP+4*LEFT) + self.play(Write(text)) + self.play(Write(text1)) + + arrow_b = Arrow(start = ORIGIN, end = 2*UP+2*RIGHT) + arrow_b.scale(1.2) + arrow_b.set_color(GREEN) + text_b = TextMobject(r"$\beta_2$") + text_b.move_to(1.5*UP+RIGHT) + text_b.set_color(GREEN) + text_b.scale(0.75) + + self.play(ShowCreation(arrow_b), Write(text_b)) + self.wait() + + arrow_b_copy = Arrow(start = ORIGIN, end = 2*UP+2*RIGHT) + arrow_b_copy.scale(1.2) + + arrow_p = Arrow(start = ORIGIN, end = 2*RIGHT) + arrow_p.scale(1.35) + arrow_p.set_color(GOLD_E) + + text_p = TextMobject("p") + text_p.move_to(0.25*DOWN+RIGHT) + text_p.set_color(GOLD_E) + + self.play(FadeOut(text), FadeOut(text1), Transform(arrow_b_copy,arrow_p), FadeOut(text_a), FadeOut(text_b)) + text = TextMobject(r"$p$ is the projection of $\beta_2$ on $\alpha_1$") + text.set_color(GOLD_E) + text.move_to(3*UP+4*LEFT) + text.scale(0.8) + self.play(Write(text),Write(text_p)) + self.wait() + + self.play(FadeIn(text_b)) + + arrow_o = Arrow(start = 2*RIGHT, end = 2*UP+2*RIGHT) + arrow_o.scale(1.35) + arrow_o.set_color(PURPLE_E) + + text_o = TextMobject(r"$\beta_2-p$") + text_o.move_to(UP+2.7*RIGHT) + text_o.scale(0.75) + text_o.set_color(PURPLE_E) + + self.play(ShowCreation(arrow_o)) + self.play(FadeOut(text),Write(text_o)) + + text = TextMobject(r"$\beta_2-p$ is orthogonal to p") + text1 = TextMobject(r"(and hence orthogonal to $\alpha_1$ also)") + text.set_color(PURPLE_E) + text1.set_color(PURPLE_E) + text.scale(0.7) + text1.scale(0.7) + text.move_to(3*UP+4*LEFT) + text1.move_to(2.5*UP+4*LEFT) + self.play(Write(text)) + self.play(Write(text1)) + self.wait(2) + + self.play(FadeOut(text_p), FadeIn(arrow_a), FadeOut(text), FadeOut(text1), FadeOut(arrow_b_copy), FadeOut(arrow_p), FadeOut(text_b), FadeOut(arrow_b)) + self.play(ApplyMethod(arrow_o.move_to,UP), ApplyMethod(text_o.move_to,RIGHT+UP)) + + text = TextMobject(r"Now, Normalize $\beta_2-p$") + text.set_color(DARK_BLUE) + text.scale(0.6) + text.move_to(3*UP+4*LEFT) + self.play(Write(text)) + + alpha_2 = Arrow(start = ORIGIN,end = UP) + alpha_2.scale(1.9) + alpha_2.set_color(DARK_BLUE) + text_alpha_2 = TextMobject(r"$\alpha_2$") + text_alpha_2.move_to(0.4*LEFT+UP) + text_alpha_2.set_color(DARK_BLUE) + text_alpha_2.scale(0.75) + self.play(Transform(text_o,text_alpha_2), Transform(arrow_o,alpha_2), FadeIn(text_a)) + self.wait() + self.play(FadeOut(text),FadeOut(text_a),FadeOut(text_o)) + + self.add(axes) + ############################################################################# + axis = TextMobject(r"$\alpha_1$",r"$\alpha_2$",r"$\alpha_3$",r"$\beta_3$",r"$\alpha_3$",r"$\alpha_3$",r"$\alpha_3$",r"$\alpha_3$") + axis.scale(0.5) + axis[0].move_to(0.5*RIGHT+[0,0,-0.5]) + axis[1].move_to(0.5*UP+[0,0,-0.5]) + axis[2].move_to(np.array([0,0,0.5])) + axis[3].move_to(np.array([1,1,1.5])) + self.add_fixed_orientation_mobjects(axis[0]) + 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=60*DEGREES,theta=45*DEGREES,run_time=3) + self.begin_ambient_camera_rotation(rate=0.3) + + line1 = Line(start = ORIGIN,end = 1*RIGHT) + line1.set_color(DARK_BLUE) + tip1 = Polygon(RIGHT,0.8*RIGHT-0.2*DOWN,0.8*RIGHT-0.2*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.8*UP-0.2*RIGHT,0.8*UP-0.2*LEFT) + tip2.set_opacity(1) + tip2.set_fill(DARK_BLUE) + tip2.set_color(DARK_BLUE) + arrow2.set_color(DARK_BLUE) + + self.play(ShowCreation(line1), ShowCreation(tip1), ShowCreation(arrow2), ShowCreation(tip2), FadeOut(arrow_a), FadeOut(arrow_o)) + self.wait() + + a_line = Line(start = ORIGIN,end = 2*UP+2*RIGHT+[0,0,2]) + a_line.set_color(GOLD_E) + a_tip = Polygon(2*UP+2*RIGHT+[0,0,2],2*UP+1.6*RIGHT+[0,0,1.8],1.6*UP+2*RIGHT+[0,0,1.8]) + a_tip.set_opacity(1) + a_tip.set_fill(GOLD_E) + a_tip.set_color(GOLD_E) + + a_line_c1 = Line(start = ORIGIN,end = 2*UP+2*RIGHT+[0,0,2]) + a_line_c1.set_color(GOLD_E) + a_tip_c1 = Polygon(2*UP+2*RIGHT+[0,0,2],2*UP+1.6*RIGHT+[0,0,1.8],1.6*UP+2*RIGHT+[0,0,1.8]) + a_tip_c1.set_opacity(1) + 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)) + + 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) + self.add_fixed_orientation_mobjects(axis[3]) + text.move_to(3*(DOWN+RIGHT)) + self.play(Write(text)) + self.wait() + self.play(FadeOut(text)) + + 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.set_opacity(1) + p_tip1.set_fill(GOLD_E) + p_tip1.set_color(GOLD_E) + + self.play(Transform(a_line_c1,p_line1),Transform(a_tip_c1,p_tip1)) + + text = TextMobject(r"Take projection of $\beta_3$ on $\alpha_1$") + text.scale(0.6) + text.set_color(GOLD_E) + self.add_fixed_in_frame_mobjects(text) + text.move_to(3*(DOWN+RIGHT)) + self.play(Write(text)) + self.wait() + self.play(FadeOut(text)) + + o_line1 = Line(start = 2*RIGHT,end = 2*UP+2*RIGHT+[0,0,2]) + o_line1.set_color(GREEN_E) + o_tip1 = Polygon(2*UP+2*RIGHT+[0,0,2],1.8*UP+2*RIGHT+[0,0,1.8]+0.2*RIGHT,1.8*UP+2*RIGHT+[0,0,1.8]-0.2*RIGHT) + o_tip1.set_opacity(1) + o_tip1.set_fill(GREEN_E) + o_tip1.set_color(GREEN_E) + + a_line1 = Line(start = ORIGIN,end = 2*UP+[0,0,2]) + a_line1.set_color(GREEN_E) + a_tip1 = Polygon(2*UP+[0,0,2],1.8*UP+[0,0,1.8]+0.2*RIGHT,1.8*UP+[0,0,1.8]-0.2*RIGHT) + a_tip1.set_opacity(1) + a_tip1.set_fill(GREEN_E) + a_tip1.set_color(GREEN_E) + + a_line1_c1 = Line(start = ORIGIN,end = 2*UP+[0,0,2]) + a_line1_c1.set_color(GREEN_E) + a_tip1_c1 = Polygon(2*UP+[0,0,2],1.8*UP+[0,0,1.8]+0.2*RIGHT,1.8*UP+[0,0,1.8]-0.2*RIGHT) + a_tip1_c1.set_opacity(1) + a_tip1_c1.set_fill(GREEN_E) + a_tip1_c1.set_color(GREEN_E) + + text = TextMobject(r"$\beta_3$-(projection of $\beta_3$ on $\alpha_1$)") + text.set_color(GREEN_E) + text.scale(0.6) + 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), + FadeOut(a_line), FadeOut(a_tip), FadeOut(axis[3]), + Transform(o_line1,a_line1), Transform(o_tip1,a_tip1)) + + self.wait() + self.play(FadeOut(text)) + + p_arrow2 = Line(start = ORIGIN,end = 2*UP) + p_arrow2.set_color(GOLD_E) + p_tip2 = Polygon(2*UP,1.8*UP+0.2*RIGHT,1.8*UP+0.2*LEFT) + p_tip2.set_opacity(1) + p_tip2.set_fill(GOLD_E) + p_tip2.set_color(GOLD_E) + p_arrow2.set_color(GOLD_E) + + last_a = Line(start = 2*UP,end = [0,2,2]) + last_a.set_color(PURPLE_E) + last_a_tip = Polygon([0,0,2],[0,0,1.8]+0.2*RIGHT,[0,0,1.8]+0.2*LEFT) + last_a_tip.move_to([0,2,2]) + last_a_tip.set_opacity(1) + last_a_tip.set_fill(PURPLE_E) + last_a_tip.set_color(PURPLE_E) + + self.wait() + text = TextMobject(r"Take projection on $\alpha_2$") + text.scale(0.6) + text.set_color(GOLD_E) + self.add_fixed_in_frame_mobjects(text) + text.move_to(3*(DOWN+RIGHT)) + self.play(Write(text)) + self.play(Transform(a_line1_c1,p_arrow2),Transform(a_tip1_c1,p_tip2)) + self.wait() + self.play(FadeOut(text)) + + text = TextMobject(r"$\beta_3$-(projection of $\beta_3$ on $\alpha_1$ + projection of $\beta_3$ on $\alpha_2$)") + text.set_color(PURPLE_E) + text.scale(0.6) + 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.wait(2) + self.play(ShowCreation(last_a_tip), ShowCreation(last_a)) + self.wait() + self.play(FadeOut(text)) + + larrow3 = Line(start = ORIGIN,end = [0,0,2]) + larrow3.set_color(PURPLE_E) + ltip3 = Polygon([0,0,2],[0,0,1.8]+0.2*RIGHT,[0,0,1.8]+0.2*LEFT) + ltip3.set_opacity(1) + ltip3.set_fill(PURPLE_E) + ltip3.set_color(PURPLE_E) + self.wait() + 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$") + text.set_color(PURPLE_E) + text1.set_color(PURPLE_E) + text.scale(0.6) + text1.scale(0.6) + 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) + self.play(Write(text)) + self.play(Write(text1)) + + arrow3 = Line(start = ORIGIN,end = [0,0,1]) + arrow3.set_color(DARK_BLUE) + tip3 = Polygon([0,0,1],[0,0,0.8]-0.2*RIGHT,[0,0,0.8]-0.2*LEFT) + tip3.set_opacity(1) + tip3.set_fill(DARK_BLUE) + tip3.set_color(DARK_BLUE) + self.play(Transform(last_a,arrow3), Transform(last_a_tip,tip3)) + self.add_fixed_orientation_mobjects(axis[2]) + + self.wait() + self.play(FadeOut(text),FadeOut(text1)) + + text = TextMobject(r"These are the three orthonormal vectors $\alpha_1, \alpha_2, \alpha_3$") + 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(3) \ No newline at end of file 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..6410a2c --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file4_Non_Standard_Basis.py @@ -0,0 +1,51 @@ +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/file5.gif b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file5.gif new file mode 100644 index 0000000..2ce3577 Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file5.gif differ 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 new file mode 100644 index 0000000..7cd7b3d Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file6.gif differ 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 new file mode 100644 index 0000000..19a13dd Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file7.gif differ 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 new file mode 100644 index 0000000..0ef4551 Binary files /dev/null and b/FSF-2020/linear-algebra/linear-transformations/Gram-Schmidt-Orthonormalization-Process/file8.gif differ 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 deleted file mode 100755 index a5d96f5..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file1_orthogonal.py +++ /dev/null @@ -1,40 +0,0 @@ -from manimlib.imports import * - -class Orthogonal(ThreeDScene): - def construct(self): - axes = ThreeDAxes() - self.play(ShowCreation(axes)) - self.move_camera(phi=60*DEGREES,theta=45*DEGREES,run_time=3) - - text = TextMobject(r"$\hat{i}$",r"$\hat{j}$",r"$\hat{k}$") - text[0].move_to(0.7*DOWN+0.8*LEFT) - text[1].move_to(0.75*DOWN+0.7*RIGHT) - text[2].move_to(0.75*UP+0.4*RIGHT) - self.add_fixed_in_frame_mobjects(text) - self.play(Write(text)) - - line1 = Line(start = ORIGIN,end = RIGHT) - line1.set_color(DARK_BLUE) - tip1 = Polygon(-0.95*LEFT,-0.8*LEFT-0.1*DOWN,-0.8*LEFT-0.1*UP) - tip1.set_opacity(1) - tip1.set_fill(DARK_BLUE) - tip1.set_color(DARK_BLUE) - - arrow2 = Line(start = ORIGIN,end = UP) - arrow2.set_color(DARK_BLUE) - tip2 = Polygon(0.95*UP,0.8*UP-0.1*RIGHT,0.8*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,0.95],[0,0,0.8]-0.1*RIGHT,[0,0,0.8]-0.1*LEFT) - tip3.set_opacity(1) - tip3.set_fill(DARK_BLUE) - tip3.set_color(DARK_BLUE) - - self.play(ShowCreation(line1), ShowCreation(tip1), ShowCreation(arrow2), ShowCreation(tip2), ShowCreation(arrow3), ShowCreation(tip3)) - - self.wait() 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 deleted file mode 100755 index 81a0888..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file2_sum_of_projections_part1.py +++ /dev/null @@ -1,133 +0,0 @@ -from manimlib.imports import * -class LinearTrans(LinearTransformationScene): - CONFIG = { - "show_basis_vectors": True, - "basis_vector_stroke_width": 1, - "leave_ghost_vectors": False, - "show_coordinates": True, - } - - def construct(self): - - self.setup() - - matrix = [[0.6,-0.8],[0.8,0.6]] - self.apply_matrix(matrix) - - self.wait(2) - orthonormal = TextMobject(r"These are 2 orthonormal vectors($v_1$ and $v_2$)") - orthonormal.scale(0.7) - orthonormal.move_to(DOWN+LEFT*3.5) - orthonormal.add_background_rectangle() - v1 = TextMobject(r"$v_1$") - v1.scale(0.75) - v1.set_color(X_COLOR) - v1.move_to(0.75*UP+RIGHT) - v1.add_background_rectangle() - v2 = TextMobject(r"$v_2$") - v2.scale(0.75) - v2.set_color(Y_COLOR) - v2.move_to(0.75*UP+LEFT*1.25) - v2.add_background_rectangle() - self.play(Write(orthonormal)) - self.play(Write(v1),Write(v2)) - self.wait() - self.play(FadeOut(orthonormal), FadeOut(v1), FadeOut(v2)) - - arrow = Arrow(start = ORIGIN,end = 3*RIGHT+UP) - arrow.scale(1.2) - arrow.set_color(BLUE) - arrow.apply_matrix(matrix) - text3 = TextMobject("v") - text3.move_to(3.2*UP+1.2*RIGHT) - text3.add_background_rectangle() - self.play(ShowCreation(arrow),Write(text3)) - self.wait() - 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) - v_cor.add_background_rectangle() - self.play(Transform(text3,v_cor)) - - line1 = DashedLine(start = 1*UP+3*RIGHT, end = 3*RIGHT) - line2 = DashedLine(start = 1*UP+3*RIGHT, end = UP) - line1.apply_matrix(matrix) - line2.apply_matrix(matrix) - self.play(ShowCreation(line1),ShowCreation(line2),run_time = 2) - - v1 = Arrow(start = ORIGIN,end = 3*RIGHT+UP) - v1.scale(1.2) - v1.set_color(BLUE) - v1.apply_matrix(matrix) - arrow1 = Arrow(start = ORIGIN,end = 3*RIGHT) - arrow1.scale(1.2) - arrow1.set_color("#6B8E23") - arrow1.apply_matrix(matrix) - self.play(Transform(v1,arrow1)) - v1_cor = TextMobject(r"$ v_1$") - v1_cor.move_to(2.5*UP+3*RIGHT) - v1_cor.scale(0.75) - v1_cor.add_background_rectangle() - self.play(Write(v1_cor)) - self.wait(0.5) - text1 = TextMobject(r"(1.8,2.4)") - text1.move_to(2.1*UP+2.5*RIGHT) - text1.scale(0.75) - text1.set_color("#6B8E23") - text1.add_background_rectangle() - self.play(Transform(v1_cor,text1)) - - v2 = Arrow(start = ORIGIN,end = 3*RIGHT+UP) - v2.scale(1.2) - v2.set_color("#8b0000") - v2.apply_matrix(matrix) - arrow2 = Arrow(start = ORIGIN,end = UP) - arrow2.scale(2.1) - arrow2.set_color("#8b0000") - arrow2.apply_matrix(matrix) - self.wait(0.5) - self.play(Transform(v2,arrow2)) - self.wait(0.5) - v2_cor = TextMobject(r"$ v_2$") - v2_cor.move_to(0.75*UP+2.5*LEFT) - v2_cor.scale(0.75) - v2_cor.add_background_rectangle() - self.play(Write(v2_cor)) - self.wait(0.5) - text2 = TextMobject(r"(-0.8,0.6)") - text2.move_to(0.75*UP+1.75*LEFT) - text2.scale(0.75) - text2.set_color("#8b0000") - text2.add_background_rectangle() - self.play(Transform(v2_cor,text2)) - - self.wait() - - self.play(ApplyMethod(v2.move_to,1.4*RIGHT+2.7*UP),FadeOut(v1_cor),FadeOut(v2_cor),FadeOut(v_cor)) - - self.wait() - - ending = TextMobject(r"$v = v_1 + v_2$") - ending.scale(0.7) - ending.move_to(DOWN) - ending.add_background_rectangle() - self.play(Write(ending)) - self.wait() - self.play(FadeOut(ending)) - - ending = TextMobject(r"$\left[ \begin{array} {c} 1\\ 3 \end{array}\right] = \left[ \begin{array} {c}1.8 \\ 2.4 \end{array}\right] + \left[ \begin{array} {c} -0.8\\ 0.6 \end{array}\right]$") - ending.scale(0.7) - ending.move_to(DOWN) - ending.add_background_rectangle() - self.play(Write(ending)) - self.wait() - self.play(FadeOut(ending)) - - ending = TextMobject(r"$v$ is the sum of projections on the orthonormal vectors") - ending.scale(0.7) - ending.move_to(DOWN) - ending.add_background_rectangle() - self.play(Write(ending)) - self.wait() - self.play(FadeOut(ending)) \ No newline at end of file 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 deleted file mode 100644 index 9d25192..0000000 --- a/FSF-2020/linear-algebra/linear-transformations/Orthonormal Basis/file3_sum_of_projections_part2.py +++ /dev/null @@ -1,173 +0,0 @@ -from manimlib.imports import * -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) - self.play(Write(basis)) - v = TextMobject(r"$v_1$",r"$v_2$",r"$v_3$") - v[0].move_to(UP*0.5+RIGHT*0.75) - v[1].move_to(UP*0.5+RIGHT*2.5) - v[2].move_to(UP*0.5+RIGHT*4) - eq = TextMobject(r"$v = \left(\begin{array}{c}3\\4\\5\end{array}\right)$") - eq1 = TextMobject(r"$ = \frac{3}{\sqrt{2}} + \frac{4}{\sqrt{2}} + 0 = \frac{7}{\sqrt{2}}$") - eq2 = TextMobject(r"$ = \frac{-3}{\sqrt{2}} + \frac{4}{\sqrt{2}} + 0 =\frac{1}{\sqrt{2}}$") - eq3 = TextMobject(r"$ =  0 + 0 + 5 =5$") - eq.move_to(4*LEFT+DOWN) - eq1.move_to(0.5*DOWN+2*RIGHT) - eq2.move_to(1.5*DOWN+2*RIGHT) - eq3.move_to(2.5*DOWN+2*RIGHT) - self.play(Write(v)) - self.play(Write(eq)) - self.play(Write(eq1)) - 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.wait() - - text = TextMobject("These are the 3 mutually orthonormal basis of the set(", r"$v_1$, ", r"$v_2$, ", r"$v_3$",")") - text[1].set_color(DARK_BLUE) - text[2].set_color(RED) - text[3].set_color(YELLOW) - text.scale(0.75) - self.add_fixed_in_frame_mobjects(text) - text.move_to(3*DOWN) - 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) - 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)) - 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]) - - self.play(ShowCreation(dashedline1), ShowCreation(dashedline2)) - - line1 = Line(start = ORIGIN,end = 0.707*RIGHT + 0.707*UP) - line1.set_color(DARK_BLUE) - tip1 = Polygon(0.707*RIGHT + 0.707*UP, 0.707*RIGHT + 0.607*UP, 0.607*RIGHT + 0.707*UP) - tip1.set_opacity(1) - tip1.set_fill(DARK_BLUE) - tip1.set_color(DARK_BLUE) - self.play(ShowCreation(line1), ShowCreation(tip1)) - - line2 = Line(start = ORIGIN,end = 0.707*LEFT + 0.707*UP) - line2.set_color(RED) - tip2 = Polygon(0.707*LEFT + 0.707*UP, 0.707*LEFT + 0.607*UP, 0.607*LEFT + 0.707*UP) - tip2.set_opacity(1) - tip2.set_fill(RED) - tip2.set_color(RED) - - self.play(ShowCreation(line2), ShowCreation(tip2)) - - line3 = Line(start = ORIGIN,end = [0,0,1]) - line3.set_color(YELLOW) - tip3 = Polygon([0,0,1],[0,0,0.8]-0.2*RIGHT,[0,0,0.8]-0.2*LEFT) - tip3.set_opacity(1) - tip3.set_fill(YELLOW) - tip3.set_color(YELLOW) - self.play(ShowCreation(line3), ShowCreation(tip3)) - self.wait() - - self.play(FadeOut(text)) - - text = TextMobject("Take the projection of ", r"$v$", " on the mutually orthonormal vectors") - text[1].set_color(GOLD_E) - text.scale(0.75) - self.add_fixed_in_frame_mobjects(text) - text.move_to(3*DOWN) - self.play(Write(text)) - self.wait(2) - - 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.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.play(ShowCreation(dashedline3),ShowCreation(dashedline4),ShowCreation(dashedline5)) - self.wait(6) - - pv1 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) - pv1.set_color(GOLD_E) - pv1tip = 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) - pv1tip.set_opacity(1) - pv1tip.set_fill(GOLD_E) - pv1tip.set_color(GOLD_E) - - v1_p = Line(start = ORIGIN,end = 3.5*RIGHT + 3.5*UP) - v1_p.set_color(BLUE_E) - v1_p_tip = Polygon(3.5*RIGHT + 3.5*UP, 3.5*RIGHT + 3.4*UP, 3.4*RIGHT + 3.5*UP) - v1_p_tip.set_opacity(1) - v1_p_tip.set_fill(BLUE_E) - v1_p_tip.set_color(BLUE_E) - - pv2 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) - pv2.set_color(GOLD_E) - pv2tip = 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) - pv2tip.set_opacity(1) - pv2tip.set_fill(GOLD_E) - pv2tip.set_color(GOLD_E) - - v2_p = Line(start = ORIGIN,end = 0.5*LEFT + 0.5*UP) - v2_p.set_color(RED_E) - v2_p_tip = Polygon(0.5*LEFT + 0.5*UP, 0.5*LEFT + 0.4*UP, 0.4*LEFT + 0.5*UP) - v2_p_tip.set_opacity(1) - v2_p_tip.set_fill(RED_E) - v2_p_tip.set_color(RED_E) - - pv3 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) - pv3.set_color(GOLD_E) - pv3tip = 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) - pv3tip.set_opacity(1) - pv3tip.set_fill(GOLD_E) - pv3tip.set_color(GOLD_E) - - 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.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.play(FadeOut(dashedline1), - FadeOut(dashedline2), - FadeOut(dashedline3), - FadeOut(dashedline4), - FadeOut(dashedline5), - FadeOut(line1), - FadeOut(tip1), - FadeOut(line2), - FadeOut(tip2), - FadeOut(line3), - FadeOut(tip3), - FadeOut(text)) - - text = TextMobject(r"$v$ is the sum of projections on the orthonormal vectors") - text.set_color(GOLD_E) - text.scale(0.75) - self.add_fixed_in_frame_mobjects(text) - text.move_to(3*DOWN) - self.play(Write(text), ApplyMethod(pv2.move_to,(3.5*RIGHT + 3.5*UP+3*RIGHT+4*UP)/2), ApplyMethod(pv2tip.move_to,(3.1*RIGHT + 3.9*UP))) - self.play(ApplyMethod(pv3.move_to,3*RIGHT + 4*UP + [0,0,2.5]), ApplyMethod(pv3tip.move_to,(3*RIGHT + 4*UP + [0,0,4.8]))) - - self.wait(3) \ No newline at end of file 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..c286736 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/README.md @@ -0,0 +1,30 @@ +# Contributer: Archit Sangal +My Github Account : architsangal +

+ +## Sub-Topics Covered: ++ Linear Transformations (Linear Maps) + +#### Video 1: Visually understanding linear transformation(using grid) +![GIF1](file12.gif) + +#### Video 2: Linear Transformation when form 1 is given +![GIF2](file11.gif) + +#### Video 3: Matrix Representation Of Linear Transformation +![GIF3](file9.gif) + +#### Video 4: Understand Linear Transformations visually +![GIF4](file13.gif) + +#### Video 5: Uniform Scaling +![GIF5](file14.gif) + +#### Fig.1 Horizontal Shear +![GIF6](file6_Horizontal_Shear_gif.gif) + +#### Fig.2 Vertical Shear +![GIF7](file7_Vertical_Shear_gif.gif) + +#### Video 6: Rotation by an angle of in anticlockwise direction +![GIF8](file10.gif) \ 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 new file mode 100755 index 0000000..a5d96f5 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file1_orthogonal.py @@ -0,0 +1,40 @@ +from manimlib.imports import * + +class Orthogonal(ThreeDScene): + def construct(self): + axes = ThreeDAxes() + self.play(ShowCreation(axes)) + self.move_camera(phi=60*DEGREES,theta=45*DEGREES,run_time=3) + + text = TextMobject(r"$\hat{i}$",r"$\hat{j}$",r"$\hat{k}$") + text[0].move_to(0.7*DOWN+0.8*LEFT) + text[1].move_to(0.75*DOWN+0.7*RIGHT) + text[2].move_to(0.75*UP+0.4*RIGHT) + self.add_fixed_in_frame_mobjects(text) + self.play(Write(text)) + + line1 = Line(start = ORIGIN,end = RIGHT) + line1.set_color(DARK_BLUE) + tip1 = Polygon(-0.95*LEFT,-0.8*LEFT-0.1*DOWN,-0.8*LEFT-0.1*UP) + tip1.set_opacity(1) + tip1.set_fill(DARK_BLUE) + tip1.set_color(DARK_BLUE) + + arrow2 = Line(start = ORIGIN,end = UP) + arrow2.set_color(DARK_BLUE) + tip2 = Polygon(0.95*UP,0.8*UP-0.1*RIGHT,0.8*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,0.95],[0,0,0.8]-0.1*RIGHT,[0,0,0.8]-0.1*LEFT) + tip3.set_opacity(1) + tip3.set_fill(DARK_BLUE) + tip3.set_color(DARK_BLUE) + + self.play(ShowCreation(line1), ShowCreation(tip1), ShowCreation(arrow2), ShowCreation(tip2), ShowCreation(arrow3), ShowCreation(tip3)) + + self.wait() 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 new file mode 100755 index 0000000..81a0888 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file2_sum_of_projections_part1.py @@ -0,0 +1,133 @@ +from manimlib.imports import * +class LinearTrans(LinearTransformationScene): + CONFIG = { + "show_basis_vectors": True, + "basis_vector_stroke_width": 1, + "leave_ghost_vectors": False, + "show_coordinates": True, + } + + def construct(self): + + self.setup() + + matrix = [[0.6,-0.8],[0.8,0.6]] + self.apply_matrix(matrix) + + self.wait(2) + orthonormal = TextMobject(r"These are 2 orthonormal vectors($v_1$ and $v_2$)") + orthonormal.scale(0.7) + orthonormal.move_to(DOWN+LEFT*3.5) + orthonormal.add_background_rectangle() + v1 = TextMobject(r"$v_1$") + v1.scale(0.75) + v1.set_color(X_COLOR) + v1.move_to(0.75*UP+RIGHT) + v1.add_background_rectangle() + v2 = TextMobject(r"$v_2$") + v2.scale(0.75) + v2.set_color(Y_COLOR) + v2.move_to(0.75*UP+LEFT*1.25) + v2.add_background_rectangle() + self.play(Write(orthonormal)) + self.play(Write(v1),Write(v2)) + self.wait() + self.play(FadeOut(orthonormal), FadeOut(v1), FadeOut(v2)) + + arrow = Arrow(start = ORIGIN,end = 3*RIGHT+UP) + arrow.scale(1.2) + arrow.set_color(BLUE) + arrow.apply_matrix(matrix) + text3 = TextMobject("v") + text3.move_to(3.2*UP+1.2*RIGHT) + text3.add_background_rectangle() + self.play(ShowCreation(arrow),Write(text3)) + self.wait() + 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) + v_cor.add_background_rectangle() + self.play(Transform(text3,v_cor)) + + line1 = DashedLine(start = 1*UP+3*RIGHT, end = 3*RIGHT) + line2 = DashedLine(start = 1*UP+3*RIGHT, end = UP) + line1.apply_matrix(matrix) + line2.apply_matrix(matrix) + self.play(ShowCreation(line1),ShowCreation(line2),run_time = 2) + + v1 = Arrow(start = ORIGIN,end = 3*RIGHT+UP) + v1.scale(1.2) + v1.set_color(BLUE) + v1.apply_matrix(matrix) + arrow1 = Arrow(start = ORIGIN,end = 3*RIGHT) + arrow1.scale(1.2) + arrow1.set_color("#6B8E23") + arrow1.apply_matrix(matrix) + self.play(Transform(v1,arrow1)) + v1_cor = TextMobject(r"$ v_1$") + v1_cor.move_to(2.5*UP+3*RIGHT) + v1_cor.scale(0.75) + v1_cor.add_background_rectangle() + self.play(Write(v1_cor)) + self.wait(0.5) + text1 = TextMobject(r"(1.8,2.4)") + text1.move_to(2.1*UP+2.5*RIGHT) + text1.scale(0.75) + text1.set_color("#6B8E23") + text1.add_background_rectangle() + self.play(Transform(v1_cor,text1)) + + v2 = Arrow(start = ORIGIN,end = 3*RIGHT+UP) + v2.scale(1.2) + v2.set_color("#8b0000") + v2.apply_matrix(matrix) + arrow2 = Arrow(start = ORIGIN,end = UP) + arrow2.scale(2.1) + arrow2.set_color("#8b0000") + arrow2.apply_matrix(matrix) + self.wait(0.5) + self.play(Transform(v2,arrow2)) + self.wait(0.5) + v2_cor = TextMobject(r"$ v_2$") + v2_cor.move_to(0.75*UP+2.5*LEFT) + v2_cor.scale(0.75) + v2_cor.add_background_rectangle() + self.play(Write(v2_cor)) + self.wait(0.5) + text2 = TextMobject(r"(-0.8,0.6)") + text2.move_to(0.75*UP+1.75*LEFT) + text2.scale(0.75) + text2.set_color("#8b0000") + text2.add_background_rectangle() + self.play(Transform(v2_cor,text2)) + + self.wait() + + self.play(ApplyMethod(v2.move_to,1.4*RIGHT+2.7*UP),FadeOut(v1_cor),FadeOut(v2_cor),FadeOut(v_cor)) + + self.wait() + + ending = TextMobject(r"$v = v_1 + v_2$") + ending.scale(0.7) + ending.move_to(DOWN) + ending.add_background_rectangle() + self.play(Write(ending)) + self.wait() + self.play(FadeOut(ending)) + + ending = TextMobject(r"$\left[ \begin{array} {c} 1\\ 3 \end{array}\right] = \left[ \begin{array} {c}1.8 \\ 2.4 \end{array}\right] + \left[ \begin{array} {c} -0.8\\ 0.6 \end{array}\right]$") + ending.scale(0.7) + ending.move_to(DOWN) + ending.add_background_rectangle() + self.play(Write(ending)) + self.wait() + self.play(FadeOut(ending)) + + ending = TextMobject(r"$v$ is the sum of projections on the orthonormal vectors") + ending.scale(0.7) + ending.move_to(DOWN) + ending.add_background_rectangle() + self.play(Write(ending)) + self.wait() + self.play(FadeOut(ending)) \ No newline at end of file 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 new file mode 100644 index 0000000..9d25192 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/Orthonormal-Basis/file3_sum_of_projections_part2.py @@ -0,0 +1,173 @@ +from manimlib.imports import * +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) + self.play(Write(basis)) + v = TextMobject(r"$v_1$",r"$v_2$",r"$v_3$") + v[0].move_to(UP*0.5+RIGHT*0.75) + v[1].move_to(UP*0.5+RIGHT*2.5) + v[2].move_to(UP*0.5+RIGHT*4) + eq = TextMobject(r"$v = \left(\begin{array}{c}3\\4\\5\end{array}\right)$") + eq1 = TextMobject(r"$ = \frac{3}{\sqrt{2}} + \frac{4}{\sqrt{2}} + 0 = \frac{7}{\sqrt{2}}$") + eq2 = TextMobject(r"$ = \frac{-3}{\sqrt{2}} + \frac{4}{\sqrt{2}} + 0 =\frac{1}{\sqrt{2}}$") + eq3 = TextMobject(r"$ =  0 + 0 + 5 =5$") + eq.move_to(4*LEFT+DOWN) + eq1.move_to(0.5*DOWN+2*RIGHT) + eq2.move_to(1.5*DOWN+2*RIGHT) + eq3.move_to(2.5*DOWN+2*RIGHT) + self.play(Write(v)) + self.play(Write(eq)) + self.play(Write(eq1)) + 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.wait() + + text = TextMobject("These are the 3 mutually orthonormal basis of the set(", r"$v_1$, ", r"$v_2$, ", r"$v_3$",")") + text[1].set_color(DARK_BLUE) + text[2].set_color(RED) + text[3].set_color(YELLOW) + text.scale(0.75) + self.add_fixed_in_frame_mobjects(text) + text.move_to(3*DOWN) + 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) + 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)) + 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]) + + self.play(ShowCreation(dashedline1), ShowCreation(dashedline2)) + + line1 = Line(start = ORIGIN,end = 0.707*RIGHT + 0.707*UP) + line1.set_color(DARK_BLUE) + tip1 = Polygon(0.707*RIGHT + 0.707*UP, 0.707*RIGHT + 0.607*UP, 0.607*RIGHT + 0.707*UP) + tip1.set_opacity(1) + tip1.set_fill(DARK_BLUE) + tip1.set_color(DARK_BLUE) + self.play(ShowCreation(line1), ShowCreation(tip1)) + + line2 = Line(start = ORIGIN,end = 0.707*LEFT + 0.707*UP) + line2.set_color(RED) + tip2 = Polygon(0.707*LEFT + 0.707*UP, 0.707*LEFT + 0.607*UP, 0.607*LEFT + 0.707*UP) + tip2.set_opacity(1) + tip2.set_fill(RED) + tip2.set_color(RED) + + self.play(ShowCreation(line2), ShowCreation(tip2)) + + line3 = Line(start = ORIGIN,end = [0,0,1]) + line3.set_color(YELLOW) + tip3 = Polygon([0,0,1],[0,0,0.8]-0.2*RIGHT,[0,0,0.8]-0.2*LEFT) + tip3.set_opacity(1) + tip3.set_fill(YELLOW) + tip3.set_color(YELLOW) + self.play(ShowCreation(line3), ShowCreation(tip3)) + self.wait() + + self.play(FadeOut(text)) + + text = TextMobject("Take the projection of ", r"$v$", " on the mutually orthonormal vectors") + text[1].set_color(GOLD_E) + text.scale(0.75) + self.add_fixed_in_frame_mobjects(text) + text.move_to(3*DOWN) + self.play(Write(text)) + self.wait(2) + + 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.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.play(ShowCreation(dashedline3),ShowCreation(dashedline4),ShowCreation(dashedline5)) + self.wait(6) + + pv1 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) + pv1.set_color(GOLD_E) + pv1tip = 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) + pv1tip.set_opacity(1) + pv1tip.set_fill(GOLD_E) + pv1tip.set_color(GOLD_E) + + v1_p = Line(start = ORIGIN,end = 3.5*RIGHT + 3.5*UP) + v1_p.set_color(BLUE_E) + v1_p_tip = Polygon(3.5*RIGHT + 3.5*UP, 3.5*RIGHT + 3.4*UP, 3.4*RIGHT + 3.5*UP) + v1_p_tip.set_opacity(1) + v1_p_tip.set_fill(BLUE_E) + v1_p_tip.set_color(BLUE_E) + + pv2 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) + pv2.set_color(GOLD_E) + pv2tip = 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) + pv2tip.set_opacity(1) + pv2tip.set_fill(GOLD_E) + pv2tip.set_color(GOLD_E) + + v2_p = Line(start = ORIGIN,end = 0.5*LEFT + 0.5*UP) + v2_p.set_color(RED_E) + v2_p_tip = Polygon(0.5*LEFT + 0.5*UP, 0.5*LEFT + 0.4*UP, 0.4*LEFT + 0.5*UP) + v2_p_tip.set_opacity(1) + v2_p_tip.set_fill(RED_E) + v2_p_tip.set_color(RED_E) + + pv3 = Line(start = ORIGIN,end = 4*UP+3*RIGHT+[0,0,5]) + pv3.set_color(GOLD_E) + pv3tip = 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) + pv3tip.set_opacity(1) + pv3tip.set_fill(GOLD_E) + pv3tip.set_color(GOLD_E) + + 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.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.play(FadeOut(dashedline1), + FadeOut(dashedline2), + FadeOut(dashedline3), + FadeOut(dashedline4), + FadeOut(dashedline5), + FadeOut(line1), + FadeOut(tip1), + FadeOut(line2), + FadeOut(tip2), + FadeOut(line3), + FadeOut(tip3), + FadeOut(text)) + + text = TextMobject(r"$v$ is the sum of projections on the orthonormal vectors") + text.set_color(GOLD_E) + text.scale(0.75) + self.add_fixed_in_frame_mobjects(text) + text.move_to(3*DOWN) + self.play(Write(text), ApplyMethod(pv2.move_to,(3.5*RIGHT + 3.5*UP+3*RIGHT+4*UP)/2), ApplyMethod(pv2tip.move_to,(3.1*RIGHT + 3.9*UP))) + self.play(ApplyMethod(pv3.move_to,3*RIGHT + 4*UP + [0,0,2.5]), ApplyMethod(pv3tip.move_to,(3*RIGHT + 4*UP + [0,0,4.8]))) + + self.wait(3) \ 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..c286736 --- /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 : architsangal +

+ +## Sub-Topics Covered: ++ Linear Transformations (Linear Maps) + +#### Video 1: Visually understanding linear transformation(using grid) +![GIF1](file12.gif) + +#### Video 2: Linear Transformation when form 1 is given +![GIF2](file11.gif) + +#### Video 3: Matrix Representation Of Linear Transformation +![GIF3](file9.gif) + +#### Video 4: Understand Linear Transformations visually +![GIF4](file13.gif) + +#### Video 5: Uniform Scaling +![GIF5](file14.gif) + +#### Fig.1 Horizontal Shear +![GIF6](file6_Horizontal_Shear_gif.gif) + +#### Fig.2 Vertical Shear +![GIF7](file7_Vertical_Shear_gif.gif) + +#### Video 6: Rotation by an angle of in anticlockwise direction +![GIF8](file10.gif) \ No newline at end of file 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..c286736 --- /dev/null +++ b/FSF-2020/linear-algebra/linear-transformations/The-Rank-Nullity-Theorem/README.md @@ -0,0 +1,30 @@ +# Contributer: Archit Sangal +My Github Account : architsangal +

+ +## Sub-Topics Covered: ++ Linear Transformations (Linear Maps) + +#### Video 1: Visually understanding linear transformation(using grid) +![GIF1](file12.gif) + +#### Video 2: Linear Transformation when form 1 is given +![GIF2](file11.gif) + +#### Video 3: Matrix Representation Of Linear Transformation +![GIF3](file9.gif) + +#### Video 4: Understand Linear Transformations visually +![GIF4](file13.gif) + +#### Video 5: Uniform Scaling +![GIF5](file14.gif) + +#### Fig.1 Horizontal Shear +![GIF6](file6_Horizontal_Shear_gif.gif) + +#### Fig.2 Vertical Shear +![GIF7](file7_Vertical_Shear_gif.gif) + +#### Video 6: Rotation by an angle of in anticlockwise direction +![GIF8](file10.gif) \ No newline at end of file -- cgit