Skip to content

Commit afb2e68

Browse files
Minor updates
1 parent c0e932f commit afb2e68

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

lectures/linear_equations.md

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ kernelspec:
1313

1414
# Linear Equations and Matrix Algebra
1515

16-
```{index} single: Linear Equations and Matrix Algebra
17-
```
18-
1916
## Overview
2017

2118
Many problems in economics and finance require solving linear equations.
@@ -127,10 +124,7 @@ basics of vectors and matrices, in both theory and computation.
127124

128125

129126

130-
## {index}`Vectors <single: Vectors>`
131-
132-
```{index} single: Linear Algebra; Vectors
133-
```
127+
## Vectors
134128

135129
A **vector** of length $n$ is just a sequence (or array, or tuple) of $n$ numbers, which we write as $x = (x_1, \ldots, x_n)$ or $x = \begin{bmatrix}x_1, \ldots, x_n\end{bmatrix}$.
136130

@@ -175,9 +169,6 @@ plt.show()
175169

176170
### Vector operations
177171

178-
```{index} single: Vectors; Operations
179-
```
180-
181172
Sometimes we want to modify vectors.
182173

183174
The two most common operators on vectors are addition and scalar
@@ -355,18 +346,12 @@ y = np.array((2, 4, 6)) # Converts tuple (2, 4, 6) into a NumPy array
355346
x + y # Add (element-by-element)
356347
```
357348

358-
```{code-cell} ipython3
349+
```{code-cell}
359350
4 * x # Scalar multiply
360351
```
361352

362353
### Inner product and norm
363354

364-
```{index} single: Vectors; Inner Product
365-
```
366-
367-
```{index} single: Vectors; Norm
368-
```
369-
370355
The **inner product** of vectors $x,y \in \mathbb R^n$ is defined as
371356

372357
$$
@@ -413,9 +398,6 @@ np.linalg.norm(x) # Norm of x, method two
413398

414399
## Matrix operations
415400

416-
```{index} single: Matrix; Operations
417-
```
418-
419401
When we discussed linear price systems, we mentioned using matrix algebra.
420402

421403
Matrix algebra is similar to algebra for numbers.
@@ -617,9 +599,6 @@ It is a useful exercise to check the following:
617599

618600
### Matrices in NumPy
619601

620-
```{index} single: Matrix; Numpy
621-
```
622-
623602
NumPy arrays are also used as matrices, and have fast, efficient functions and methods for all the standard matrix operations.
624603

625604
You can create them manually from tuples of tuples (or lists of lists) as follows
@@ -860,9 +839,6 @@ the following questions
860839

861840
## Solving systems of equations
862841

863-
```{index} single: Matrix; Solving Systems of Equations
864-
```
865-
866842
Recall again the system of equations {eq}`la_se`, which we write here again as
867843

868844
```{math}
@@ -1021,9 +997,6 @@ This is the solution to $Ax = b$ --- the solution we are looking for.
1021997

1022998
### Linear equations with NumPy
1023999

1024-
```{index} single: Linear Algebra; SciPy
1025-
```
1026-
10271000
In the two good example we obtained the matrix equation,
10281001

10291002
$$

0 commit comments

Comments
 (0)