GitHub

@@ -85,7 +85,7 @@ from scipy.linalg import inv, solve, det, eig

8585

```{index} single: Linear Algebra; Vectors

8686

```

878788-

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 = [x_1, \ldots, x_n]$.

88+

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 = [x_1, \ldots, x_n]$.

89899090

We will write these sequences either horizontally or vertically as we please.

9191

@@ -225,15 +225,15 @@ x + y

225225

```{index} single: Vectors; Norm

226226

```

227227228-

The *inner product* of vectors $x,y \in \mathbb R ^n$ is defined as

228+

The **inner product** of vectors $x,y \in \mathbb R ^n$ is defined as

229229230230

$$

231231

x' y := \sum_{i=1}^n x_i y_i

232232

$$

233233234-

Two vectors are called *orthogonal* if their inner product is zero.

234+

Two vectors are called **orthogonal** if their inner product is zero.

235235236-

The *norm* of a vector $x$ represents its "length" (i.e., its distance from the zero vector) and is defined as

236+

The **norm** of a vector $x$ represents its "length" (i.e., its distance from the zero vector) and is defined as

237237238238

$$

239239

\| x \| := \sqrt{x' x} := \left( \sum_{i=1}^n x_i^2 \right)^{1/2}

@@ -273,7 +273,7 @@ np.linalg.norm(x) # Norm of x, take three

273273274274

Given a set of vectors $A := \{a_1, \ldots, a_k\}$ in $\mathbb R ^n$, it's natural to think about the new vectors we can create by performing linear operations.

275275276-

New vectors created in this manner are called *linear combinations* of $A$.

276+

New vectors created in this manner are called **linear combinations** of $A$.

277277278278

In particular, $y \in \mathbb R ^n$ is a linear combination of $A := \{a_1, \ldots, a_k\}$ if

279279

@@ -282,9 +282,9 @@ y = \beta_1 a_1 + \cdots + \beta_k a_k

282282

\text{ for some scalars } \beta_1, \ldots, \beta_k

283283

$$

284284285-

In this context, the values $\beta_1, \ldots, \beta_k$ are called the *coefficients* of the linear combination.

285+

In this context, the values $\beta_1, \ldots, \beta_k$ are called the **coefficients** of the linear combination.

286286287-

The set of linear combinations of $A$ is called the *span* of $A$.

287+

The set of linear combinations of $A$ is called the **span** of $A$.

288288289289

The next figure shows the span of $A = \{a_1, a_2\}$ in $\mathbb R ^3$.

290290

@@ -349,7 +349,7 @@ plt.show()

349349

If $A$ contains only one vector $a_1 \in \mathbb R ^2$, then its

350350

span is just the scalar multiples of $a_1$, which is the unique line passing through both $a_1$ and the origin.

351351352-

If $A = \{e_1, e_2, e_3\}$ consists of the *canonical basis vectors* of $\mathbb R ^3$, that is

352+

If $A = \{e_1, e_2, e_3\}$ consists of the **canonical basis vectors** of $\mathbb R ^3$, that is

353353354354

$$

355355

e_1 :=

@@ -399,8 +399,8 @@ The condition we need for a set of vectors to have a large span is what's called

399399400400

In particular, a collection of vectors $A := \{a_1, \ldots, a_k\}$ in $\mathbb R ^n$ is said to be

401401402-

* *linearly dependent* if some strict subset of $A$ has the same span as $A$.

403-

* *linearly independent* if it is not linearly dependent.

402+

* **linearly dependent** if some strict subset of $A$ has the same span as $A$.

403+

* **linearly independent** if it is not linearly dependent.

404404405405

Put differently, a set of vectors is linearly independent if no vector is redundant to the span and linearly dependent otherwise.

406406

@@ -469,19 +469,19 @@ Often, the numbers in the matrix represent coefficients in a system of linear eq

469469470470

For obvious reasons, the matrix $A$ is also called a vector if either $n = 1$ or $k = 1$.

471471472-

In the former case, $A$ is called a *row vector*, while in the latter it is called a *column vector*.

472+

In the former case, $A$ is called a **row vector**, while in the latter it is called a **column vector**.

473473474-

If $n = k$, then $A$ is called *square*.

474+

If $n = k$, then $A$ is called **square**.

475475476-

The matrix formed by replacing $a_{ij}$ by $a_{ji}$ for every $i$ and $j$ is called the *transpose* of $A$ and denoted $A'$ or $A^{\top}$.

476+

The matrix formed by replacing $a_{ij}$ by $a_{ji}$ for every $i$ and $j$ is called the **transpose** of $A$ and denoted $A'$ or $A^{\top}$.

477477478-

If $A = A'$, then $A$ is called *symmetric*.

478+

If $A = A'$, then $A$ is called **symmetric**.

479479480-

For a square matrix $A$, the $i$ elements of the form $a_{ii}$ for $i=1,\ldots,n$ are called the *principal diagonal*.

480+

For a square matrix $A$, the $i$ elements of the form $a_{ii}$ for $i=1,\ldots,n$ are called the **principal diagonal**.

481481482-

$A$ is called *diagonal* if the only nonzero entries are on the principal diagonal.

482+

$A$ is called **diagonal** if the only nonzero entries are on the principal diagonal.

483483484-

If, in addition to being diagonal, each element along the principal diagonal is equal to 1, then $A$ is called the *identity matrix* and denoted by $I$.

484+

If, in addition to being diagonal, each element along the principal diagonal is equal to 1, then $A$ is called the **identity matrix** and denoted by $I$.

485485486486

### Matrix Operations

487487

@@ -641,9 +641,9 @@ See [here](https://python-programming.quantecon.org/numpy.html#matrix-multiplica

641641642642

Each $n \times k$ matrix $A$ can be identified with a function $f(x) = Ax$ that maps $x \in \mathbb R ^k$ into $y = Ax \in \mathbb R ^n$.

643643644-

These kinds of functions have a special property: they are *linear*.

644+

These kinds of functions have a special property: they are **linear**.

645645646-

A function $f \colon \mathbb R ^k \to \mathbb R ^n$ is called *linear* if, for all $x, y \in \mathbb R ^k$ and all scalars $\alpha, \beta$, we have

646+

A function $f \colon \mathbb R ^k \to \mathbb R ^n$ is called **linear** if, for all $x, y \in \mathbb R ^k$ and all scalars $\alpha, \beta$, we have

647647648648

$$

649649

f(\alpha x + \beta y) = \alpha f(x) + \beta f(y)

@@ -773,7 +773,7 @@ In particular, the following are equivalent

773773

1. The columns of $A$ are linearly independent.

774774

1. For any $y \in \mathbb R ^n$, the equation $y = Ax$ has a unique solution.

775775776-

The property of having linearly independent columns is sometimes expressed as having *full column rank*.

776+

The property of having linearly independent columns is sometimes expressed as having **full column rank**.

777777778778

#### Inverse Matrices

779779

@@ -788,7 +788,7 @@ solution is $x = A^{-1} y$.

788788

A similar expression is available in the matrix case.

789789790790

In particular, if square matrix $A$ has full column rank, then it possesses a multiplicative

791-

*inverse matrix* $A^{-1}$, with the property that $A A^{-1} = A^{-1} A = I$.

791+

**inverse matrix** $A^{-1}$, with the property that $A A^{-1} = A^{-1} A = I$.

792792793793

As a consequence, if we pre-multiply both sides of $y = Ax$ by $A^{-1}$, we get $x = A^{-1} y$.

794794

@@ -800,11 +800,11 @@ This is the solution that we're looking for.

800800

```

801801802802

Another quick comment about square matrices is that to every such matrix we

803-

assign a unique number called the *determinant* of the matrix --- you can find

803+

assign a unique number called the **determinant** of the matrix --- you can find

804804

the expression for it [here](https://en.wikipedia.org/wiki/Determinant).

805805806806

If the determinant of $A$ is not zero, then we say that $A$ is

807-

*nonsingular*.

807+

**nonsingular**.

808808809809

Perhaps the most important fact about determinants is that $A$ is nonsingular if and only if $A$ is of full column rank.

810810

@@ -929,8 +929,8 @@ $$

929929

A v = \lambda v

930930

$$

931931932-

then we say that $\lambda$ is an *eigenvalue* of $A$, and

933-

$v$ is an *eigenvector*.

932+

then we say that $\lambda$ is an **eigenvalue** of $A$, and

933+

$v$ is an **eigenvector**.

934934935935

Thus, an eigenvector of $A$ is a vector such that when the map $f(x) = Ax$ is applied, $v$ is merely scaled.

936936

@@ -1034,7 +1034,7 @@ to one.

1034103410351035

### Generalized Eigenvalues

103610361037-

It is sometimes useful to consider the *generalized eigenvalue problem*, which, for given

1037+

It is sometimes useful to consider the **generalized eigenvalue problem**, which, for given

10381038

matrices $A$ and $B$, seeks generalized eigenvalues

10391039

$\lambda$ and eigenvectors $v$ such that

10401040

@@ -1076,10 +1076,10 @@ $$

10761076

$$

1077107710781078

The norms on the right-hand side are ordinary vector norms, while the norm on

1079-

the left-hand side is a *matrix norm* --- in this case, the so-called

1080-

*spectral norm*.

1079+

the left-hand side is a **matrix norm** --- in this case, the so-called

1080+

**spectral norm**.

108110811082-

For example, for a square matrix $S$, the condition $\| S \| < 1$ means that $S$ is *contractive*, in the sense that it pulls all vectors towards the origin [^cfn].

1082+

For example, for a square matrix $S$, the condition $\| S \| < 1$ means that $S$ is **contractive**, in the sense that it pulls all vectors towards the origin [^cfn].

1083108310841084

(la_neumann)=

10851085

#### {index}`Neumann's Theorem <single: Neumann's Theorem>`

@@ -1112,7 +1112,7 @@ $$

11121112

\rho(A) = \lim_{k \to \infty} \| A^k \|^{1/k}

11131113

$$

111411141115-

Here $\rho(A)$ is the *spectral radius*, defined as $\max_i |\lambda_i|$, where $\{\lambda_i\}_i$ is the set of eigenvalues of $A$.

1115+

Here $\rho(A)$ is the **spectral radius**, defined as $\max_i |\lambda_i|$, where $\{\lambda_i\}_i$ is the set of eigenvalues of $A$.

1116111611171117

As a consequence of Gelfand's formula, if all eigenvalues are strictly less than one in modulus,

11181118

there exists a $k$ with $\| A^k \| < 1$.

@@ -1128,8 +1128,8 @@ Let $A$ be a symmetric $n \times n$ matrix.

1128112811291129

We say that $A$ is

113011301131-

1. *positive definite* if $x' A x > 0$ for every $x \in \mathbb R ^n \setminus \{0\}$

1132-

1. *positive semi-definite* or *nonnegative definite* if $x' A x \geq 0$ for every $x \in \mathbb R ^n$

1131+

1. **positive definite** if $x' A x > 0$ for every $x \in \mathbb R ^n \setminus \{0\}$

1132+

1. **positive semi-definite** or **nonnegative definite** if $x' A x \geq 0$ for every $x \in \mathbb R ^n$

1133113311341134

Analogous definitions exist for negative definite and negative semi-definite matrices.

11351135

Read the original on github.com ↗