Skip to content

Commit 206ff64

Browse files
Minor updates
1 parent 46cbf28 commit 206ff64

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

lectures/linear_equations.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ kernelspec:
1313

1414
# Linear Equations and Matrix Algebra
1515

16+
```{index} single: Linear Equations and Matrix Algebra
17+
```
18+
1619
## Overview
1720

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

125128

126129

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

129135
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}$.
130136

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

170176
### Vector operations
171177

178+
```{index} single: Vectors; Operations
179+
```
180+
172181
Sometimes we want to modify vectors.
173182

174183
The two most common operators on vectors are addition and scalar
@@ -352,6 +361,12 @@ x + y # Add (element-by-element)
352361

353362
### Inner product and norm
354363

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

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

399414
## Matrix operations
400415

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

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

600618
### Matrices in NumPy
601619

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

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

840861
## Solving systems of equations
841862

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

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

9981022
### Linear equations with NumPy
9991023

1024+
```{index} single: Linear Algebra; SciPy
1025+
```
1026+
10001027
In the two good example we obtained the matrix equation,
10011028

10021029
$$

0 commit comments

Comments
 (0)