From f4df65cc2bb8f927d7f815a52a3bf2db5f0eda54 Mon Sep 17 00:00:00 2001 From: Longye Tian Date: Tue, 23 Jul 2024 17:15:04 +1000 Subject: [PATCH 1/6] update the example environment --- lectures/linear_equations.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lectures/linear_equations.md b/lectures/linear_equations.md index dc4469b6e..fb209ead1 100644 --- a/lectures/linear_equations.md +++ b/lectures/linear_equations.md @@ -141,11 +141,10 @@ column vectors. The set of all $n$-vectors is denoted by $\mathbb R^n$. -For example, - +```{prf:example} * $\mathbb R^2$ is the plane --- the set of pairs $(x_1, x_2)$. * $\mathbb R^3$ is 3 dimensional space --- the set of vectors $(x_1, x_2, x_3)$. - +``` Often vectors are represented visually as arrows from the origin to the point. Here's a visualization. @@ -185,8 +184,7 @@ multiplication, which we now describe. When we add two vectors, we add them element-by-element. -For example, - +```{prf:example} $$ \begin{bmatrix} 4 \\ @@ -208,6 +206,7 @@ $$ 1 \end{bmatrix}. $$ +``` In general, @@ -273,8 +272,7 @@ plt.show() Scalar multiplication is an operation that multiplies a vector $x$ with a scalar elementwise. -For example, - +```{prf: example} $$ -2 \begin{bmatrix} @@ -292,6 +290,7 @@ $$ 14 \end{bmatrix}. $$ +``` More generally, it takes a number $\gamma$ and a vector $x$ and produces @@ -429,8 +428,7 @@ matrices. Scalar multiplication and addition are generalizations of the vector case: -Here is an example of scalar multiplication - +```{prf: example} $$ 3 \begin{bmatrix} @@ -443,6 +441,7 @@ $$ 0 & 15 \end{bmatrix}. $$ +``` In general for a number $\gamma$ and any matrix $A$, @@ -461,6 +460,7 @@ $$ \end{bmatrix}. $$ +```{prf: example} Consider this example of matrix addition, $$ @@ -479,6 +479,7 @@ $$ 7 & 12 \end{bmatrix}. $$ +``` In general, @@ -518,6 +519,7 @@ $j$-th column of $B$. If $A$ is $n \times k$ and $B$ is $j \times m$, then to multiply $A$ and $B$ we require $k = j$, and the resulting matrix $A B$ is $n \times m$. +```{prf: example} Here's an example of a $2 \times 2$ matrix multiplied by a $2 \times 1$ vector. $$ @@ -536,6 +538,7 @@ Ax = a_{21}x_1 + a_{22}x_2 \end{bmatrix} $$ +``` As an important special case, consider multiplying $n \times k$ matrix $A$ and $k \times 1$ column vector $x$. @@ -839,6 +842,7 @@ In matrix form, the system {eq}`la_se` becomes \end{bmatrix}. ``` +```{prf:example} For example, {eq}`n_eq_sys_la` has this form with $$ @@ -848,7 +852,7 @@ $$ \quad \text{and} \quad x = p. $$ - +``` When considering problems such as {eq}`la_gf`, we need to ask at least some of the following questions From f924ed9cbb38e54c4623e5de5a48f9001e805152 Mon Sep 17 00:00:00 2001 From: Longye Tian Date: Tue, 23 Jul 2024 18:04:03 +1000 Subject: [PATCH 2/6] update example environment --- lectures/linear_equations.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lectures/linear_equations.md b/lectures/linear_equations.md index fb209ead1..72e0741f1 100644 --- a/lectures/linear_equations.md +++ b/lectures/linear_equations.md @@ -272,7 +272,7 @@ plt.show() Scalar multiplication is an operation that multiplies a vector $x$ with a scalar elementwise. -```{prf: example} +```{prf:example} $$ -2 \begin{bmatrix} @@ -428,7 +428,7 @@ matrices. Scalar multiplication and addition are generalizations of the vector case: -```{prf: example} +```{prf:example} $$ 3 \begin{bmatrix} @@ -460,7 +460,7 @@ $$ \end{bmatrix}. $$ -```{prf: example} +```{prf:example} Consider this example of matrix addition, $$ @@ -519,7 +519,7 @@ $j$-th column of $B$. If $A$ is $n \times k$ and $B$ is $j \times m$, then to multiply $A$ and $B$ we require $k = j$, and the resulting matrix $A B$ is $n \times m$. -```{prf: example} +```{prf:example} Here's an example of a $2 \times 2$ matrix multiplied by a $2 \times 1$ vector. $$ From 82b403b5816af2d628471ae7fcabaeeeced39268 Mon Sep 17 00:00:00 2001 From: Longye Tian Date: Tue, 23 Jul 2024 18:30:20 +1000 Subject: [PATCH 3/6] update example environment --- lectures/linear_equations.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lectures/linear_equations.md b/lectures/linear_equations.md index 72e0741f1..c862d16f3 100644 --- a/lectures/linear_equations.md +++ b/lectures/linear_equations.md @@ -142,6 +142,8 @@ column vectors. The set of all $n$-vectors is denoted by $\mathbb R^n$. ```{prf:example} +:label:ex_dim + * $\mathbb R^2$ is the plane --- the set of pairs $(x_1, x_2)$. * $\mathbb R^3$ is 3 dimensional space --- the set of vectors $(x_1, x_2, x_3)$. ``` @@ -185,6 +187,8 @@ multiplication, which we now describe. When we add two vectors, we add them element-by-element. ```{prf:example} +:label:ex_add + $$ \begin{bmatrix} 4 \\ @@ -273,6 +277,8 @@ plt.show() Scalar multiplication is an operation that multiplies a vector $x$ with a scalar elementwise. ```{prf:example} +:label:ex_mul + $$ -2 \begin{bmatrix} @@ -429,6 +435,8 @@ matrices. Scalar multiplication and addition are generalizations of the vector case: ```{prf:example} +:label:ex_asm + $$ 3 \begin{bmatrix} @@ -461,6 +469,8 @@ $$ $$ ```{prf:example} +:label:ex_ma + Consider this example of matrix addition, $$ @@ -520,6 +530,8 @@ If $A$ is $n \times k$ and $B$ is $j \times m$, then to multiply $A$ and $B$ we require $k = j$, and the resulting matrix $A B$ is $n \times m$. ```{prf:example} +:label:ex_2dmul + Here's an example of a $2 \times 2$ matrix multiplied by a $2 \times 1$ vector. $$ @@ -843,6 +855,7 @@ In matrix form, the system {eq}`la_se` becomes ``` ```{prf:example} +:label:ex_gls For example, {eq}`n_eq_sys_la` has this form with $$ From b50aa75bbbc7bd2a2aebde7e0ea55e9a52b2da24 Mon Sep 17 00:00:00 2001 From: Longye Tian Date: Tue, 23 Jul 2024 18:40:13 +1000 Subject: [PATCH 4/6] update example --- lectures/linear_equations.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lectures/linear_equations.md b/lectures/linear_equations.md index c862d16f3..19fff2f0c 100644 --- a/lectures/linear_equations.md +++ b/lectures/linear_equations.md @@ -142,7 +142,7 @@ column vectors. The set of all $n$-vectors is denoted by $\mathbb R^n$. ```{prf:example} -:label:ex_dim +:label: ex_dim * $\mathbb R^2$ is the plane --- the set of pairs $(x_1, x_2)$. * $\mathbb R^3$ is 3 dimensional space --- the set of vectors $(x_1, x_2, x_3)$. @@ -187,7 +187,7 @@ multiplication, which we now describe. When we add two vectors, we add them element-by-element. ```{prf:example} -:label:ex_add +:label: ex_add $$ \begin{bmatrix} @@ -277,7 +277,7 @@ plt.show() Scalar multiplication is an operation that multiplies a vector $x$ with a scalar elementwise. ```{prf:example} -:label:ex_mul +:label: ex_mul $$ -2 @@ -435,7 +435,7 @@ matrices. Scalar multiplication and addition are generalizations of the vector case: ```{prf:example} -:label:ex_asm +:label: ex_asm $$ 3 @@ -469,7 +469,7 @@ $$ $$ ```{prf:example} -:label:ex_ma +:label: ex_ma Consider this example of matrix addition, @@ -530,7 +530,7 @@ If $A$ is $n \times k$ and $B$ is $j \times m$, then to multiply $A$ and $B$ we require $k = j$, and the resulting matrix $A B$ is $n \times m$. ```{prf:example} -:label:ex_2dmul +:label: ex_2dmul Here's an example of a $2 \times 2$ matrix multiplied by a $2 \times 1$ vector. @@ -855,7 +855,7 @@ In matrix form, the system {eq}`la_se` becomes ``` ```{prf:example} -:label:ex_gls +:label: ex_gls For example, {eq}`n_eq_sys_la` has this form with $$ From bd962da3f665c844f48da247b19ae419694ccaa5 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Tue, 23 Jul 2024 20:52:37 +1000 Subject: [PATCH 5/6] Update lectures/linear_equations.md --- lectures/linear_equations.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lectures/linear_equations.md b/lectures/linear_equations.md index 19fff2f0c..6b50e3ca6 100644 --- a/lectures/linear_equations.md +++ b/lectures/linear_equations.md @@ -147,6 +147,7 @@ The set of all $n$-vectors is denoted by $\mathbb R^n$. * $\mathbb R^2$ is the plane --- the set of pairs $(x_1, x_2)$. * $\mathbb R^3$ is 3 dimensional space --- the set of vectors $(x_1, x_2, x_3)$. ``` + Often vectors are represented visually as arrows from the origin to the point. Here's a visualization. From d4ec437c01d249f1d3dd6ed1d6267d684b2efa1d Mon Sep 17 00:00:00 2001 From: Longye Tian Date: Wed, 24 Jul 2024 10:12:25 +1000 Subject: [PATCH 6/6] add lecture label --- lectures/linear_equations.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lectures/linear_equations.md b/lectures/linear_equations.md index 6b50e3ca6..4b9ccb0fb 100644 --- a/lectures/linear_equations.md +++ b/lectures/linear_equations.md @@ -142,7 +142,7 @@ column vectors. The set of all $n$-vectors is denoted by $\mathbb R^n$. ```{prf:example} -:label: ex_dim +:label: le_ex_dim * $\mathbb R^2$ is the plane --- the set of pairs $(x_1, x_2)$. * $\mathbb R^3$ is 3 dimensional space --- the set of vectors $(x_1, x_2, x_3)$. @@ -188,7 +188,7 @@ multiplication, which we now describe. When we add two vectors, we add them element-by-element. ```{prf:example} -:label: ex_add +:label: le_ex_add $$ \begin{bmatrix} @@ -278,7 +278,7 @@ plt.show() Scalar multiplication is an operation that multiplies a vector $x$ with a scalar elementwise. ```{prf:example} -:label: ex_mul +:label: le_ex_mul $$ -2 @@ -436,7 +436,7 @@ matrices. Scalar multiplication and addition are generalizations of the vector case: ```{prf:example} -:label: ex_asm +:label: le_ex_asm $$ 3 @@ -470,7 +470,7 @@ $$ $$ ```{prf:example} -:label: ex_ma +:label: le_ex_ma Consider this example of matrix addition, @@ -531,7 +531,7 @@ If $A$ is $n \times k$ and $B$ is $j \times m$, then to multiply $A$ and $B$ we require $k = j$, and the resulting matrix $A B$ is $n \times m$. ```{prf:example} -:label: ex_2dmul +:label: le_ex_2dmul Here's an example of a $2 \times 2$ matrix multiplied by a $2 \times 1$ vector. @@ -856,7 +856,7 @@ In matrix form, the system {eq}`la_se` becomes ``` ```{prf:example} -:label: ex_gls +:label: le_ex_gls For example, {eq}`n_eq_sys_la` has this form with $$