Skip to content

Commit 52d7eff

Browse files
committed
update based on comments and fix typos
1 parent 3de16e1 commit 52d7eff

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

lectures/greek_square.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ kernelspec:
1919
## Introduction
2020

2121

22-
This lecture can be viewed as a sequel to this QuantEcon lecture {doc}`eigenvalues and eigenvectors <eigen_I>`
22+
This lecture can be viewed as a sequel to this QuantEcon lecture {doc}`eigen_I`
2323

24-
It provides an example of how eigen vectors isolate **invariant subspaces** that help construct and analyze solutions of linear difference equations.
24+
It provides an example of how eigenvectors isolate *invariant subspaces* that help construct and analyze solutions of linear difference equations.
2525

2626
When vector $x_t$ starts in an invariant subspace, iterating the different equation keeps $x_{t+j}$
2727
in that subspace for all $j \geq 1$.
2828

29-
Invariant subspace methods are used throughout applied economic dynamics, for example, in this QuantEcon lecture {doc}`money financed government deficits and inflation <money_inflation>`
29+
Invariant subspace methods are used throughout applied economic dynamics, for example, in this QuantEcon lecture {doc}`money_inflation`
3030

3131
Our approach here is to illustrate the method with an ancient example, one that ancient Greek mathematicians used to compute square roots of positive integers.
3232

3333
In this lecture we assume that we have yet
3434

35-
## Perfect Squares and Irrational Numbers
35+
## Perfect squares and irrational numbers
3636

3737
An integer is called a **perfect square** if its square root is also an integer.
3838

@@ -58,10 +58,10 @@ In this lecture, we'll describe this method.
5858

5959
We'll also use invariant subspaces to describe variations on this method that are faster.
6060

61-
## Second order linear difference equations
61+
## Second-order linear difference equations
6262

6363
Before telling how the ancient Greeks computed square roots, we'll provide a quick introduction
64-
to second order linear difference equations.
64+
to second-order linear difference equations.
6565

6666
We'll study the following second-order linear difference equation
6767

@@ -78,14 +78,15 @@ There is one equation each for $t = 0, 1, 2, \ldots$.
7878
7979
We could follow an approach taken in this QuantEcon lecture {doc}`present values<pv>` and stack all of these equations into a single matrix equation that we would then solve by using matrix inversion.
8080
81-
```{note} In the present instance, the matrix equation would multiply a countably infinite dimensional square matrix by a countably infinite dimensional vector. With some qualifications, matrix multiplication and inversion tools apply to such an equation.
81+
```{note}
82+
In the present instance, the matrix equation would multiply a countably infinite dimensional square matrix by a countably infinite dimensional vector. With some qualifications, matrix multiplication and inversion tools apply to such an equation.
8283
```
8384
8485
But we won't pursue that approach here.
8586
8687
8788
Instead, we'll seek to find a time-invariant function that *solves* our difference equation, meaning
88-
thatit provides a formula for a $\{y_t\}_{t=0}^\infty$ sequence that satisfies
89+
that it provides a formula for a $\{y_t\}_{t=0}^\infty$ sequence that satisfies
8990
equation {eq}`eq:2diff1` for each $t \geq 0$.
9091
9192
We seek an expression for $y_t, t \geq 0$ as functions of the initial conditions $(y_{-1}, y_{-2})$:
@@ -94,7 +95,7 @@ $$
9495
y_t = g((y_{-1}, y_{-2});t), \quad t \geq 0
9596
$$ (eq:2diff2)
9697
97-
We call such a function $g$ a **solution** of the difference equation {eq}`eq:2diff1`.
98+
We call such a function $g$ a *solution* of the difference equation {eq}`eq:2diff1`.
9899
99100
One way to discover a solution is to use a guess and verify method.
100101
@@ -120,7 +121,7 @@ $$
120121
\left(a_1 + \frac{a_2}{\delta}\right) = \delta
121122
$$ (eq:2diff5)
122123
123-
which we can rewrite as the **characteristic equation**
124+
which we can rewrite as the *characteristic equation*
124125
125126
$$
126127
\delta^2 - a_1 \delta - a_2 = 0
@@ -139,13 +140,13 @@ $$
139140
y_t = \delta^t y_0 , \forall t \geq 0
140141
$$ (eq:2diff8)
141142
142-
provded that we set
143+
provided that we set
143144
144145
$$
145146
y_0 = \delta y_{-1} .
146147
$$
147148
148-
The **general** solution of difference equation {eq}`eq:2diff1` takes the form
149+
The *general* solution of difference equation {eq}`eq:2diff1` takes the form
149150
150151
$$
151152
y_t = \eta_1 \delta_1^t + \eta_2 \delta_2^t
@@ -186,21 +187,21 @@ So $\sigma \in {\mathcal I} \equiv \{2, 3, \ldots \}$
186187
187188
We want an algorithm to compute the square root of $\sigma \in {\mathcal I}$.
188189
189-
If $\sqrt{\sigma} \in {\mathcal I}$, $\sigma $ is said to be a **perfect square**.
190+
If $\sqrt{\sigma} \in {\mathcal I}$, $\sigma $ is said to be a *perfect square*.
190191
191192
If $\sqrt{\sigma} \not\in {\mathcal I}$, it turns out that it is irrational.
192193
193194
Ancient Greeks used a recursive algorithm to compute square roots of integers that are not perfect squares.
194195
195-
The algorithm iterates on a second order linear difference equation in the sequence $\{y_t\}_{t=0}^\infty$:
196+
The algorithm iterates on a second-order linear difference equation in the sequence $\{y_t\}_{t=0}^\infty$:
196197
197198
$$
198199
y_{t} = 2 y_{t-1} - (1 - \sigma) y_{t-2}, \quad t \geq 0
199200
$$ (eq:second_order)
200201
201202
together with a pair of integers that are initial conditions for $y_{-1}, y_{-2}$.
202203
203-
First, we'll deploy some techniques for solving difference equations that are also deployed in this QuantEcon lecture about the multiplier-accelerator model:
204+
First, we'll deploy some techniques for solving the difference equations that are also deployed in this QuantEcon lecture about the multiplier-accelerator model:
204205
<https://python.quantecon.org/samuelson.html>
205206
206207
@@ -257,16 +258,16 @@ $$
257258
where $\eta_1$ and $\eta_2$ are chosen to satisfy prescribed initial conditions $y_{-1}, y_{-2}$:
258259
259260
$$
260-
\begin{align}
261+
\begin{aligned}
261262
\lambda_1^{-1} \eta_1 + \lambda_2^{-1} \eta_2 & = y_{-1} \cr
262263
\lambda_1^{-2} \eta_1 + \lambda_2^{-2} \eta_2 & = y_{-2}
263-
\end{align}
264+
\end{aligned}
264265
$$(eq:leq_sq)
265266
266267
System {eq}`eq:leq_sq` of simultaneous linear equations will play a big role in the remainder of this lecture.
267268
268269
Since $\lambda_1 = 1 + \sqrt{\sigma} > 1 > \lambda_2 = 1 - \sqrt{\sigma} $,
269-
it follows that for **almost all** (but not all) initial conditions
270+
it follows that for *almost all* (but not all) initial conditions
270271
271272
$$
272273
\lim_{t \rightarrow \infty} \left(\frac{y_{t+1}}{y_t}\right) = 1 + \sqrt{\sigma}
@@ -316,7 +317,7 @@ System {eq}`eq:leq_sq` of simultaneous linear equations can be used in various w
316317
317318
Notice how we used the second approach above when we set $\eta_1, \eta_2$ either to $(0, 1)$, for example, or $(1, 0)$, for example.
318319
319-
In taking this second approach, we constructed an **invariant subspace** of ${\bf R}^2$.
320+
In taking this second approach, we constructed an *invariant subspace* of ${\bf R}^2$.
320321
321322
Here is what is going on.
322323
@@ -426,7 +427,7 @@ We find that convergence is immediate.
426427
427428
+++
428429
429-
Next, we'll represent the preceding analysis by first vectorizing our second order difference equation {eq}`eq:second_order` and then using eigendecompositions of an associated state transition matrix.
430+
Next, we'll represent the preceding analysis by first vectorizing our second-order difference equation {eq}`eq:second_order` and then using eigendecompositions of an associated state transition matrix.
430431
431432
## Vectorizing the difference equation
432433
@@ -558,9 +559,9 @@ plt.ylim(-1.5, 1.5)
558559
plt.show()
559560
```
560561
561-
## Invariant Subspace Approach
562+
## Invariant subspace approach
562563
563-
The preceding calculation indicates that we can use the eigenvectors $V$ to construct 2-dimensional **invariant subspaces**.
564+
The preceding calculation indicates that we can use the eigenvectors $V$ to construct 2-dimensional *invariant subspaces*.
564565
565566
We'll pursue that possibility now.
566567
@@ -722,12 +723,12 @@ plt.tight_layout()
722723
plt.show()
723724
```
724725
725-
## Concluding Remarks
726+
## Concluding remarks
726727
727-
This lecture sets the stage for many other applications of the **invariant subspace** methods.
728+
This lecture sets the stage for many other applications of the *invariant subspace* methods.
728729
729730
All of these exploit very similar equations based on eigen decompositions.
730731
731732
We shall encounter equations very similar to {eq}`eq:deactivate1` and {eq}`eq:deactivate2`
732-
in this QuantEcon lecture {doc}`money financed government deficits and inflation <money_inflation>`
733+
in this QuantEcon lecture {doc}`money_inflation`
733734
and in many other places in dynamic economic theory.

0 commit comments

Comments
 (0)