Books Sample

Matrices and arrays

Parentheses around a grid is the default matrix.

(1234)\begin{pmatrix}1 & 2 \\ 3 & 4\end{pmatrix}
(3.17)

Brackets when I mean a linear map written in coordinates:

[π‘Žπ‘π‘π‘‘]\begin{bmatrix}π‘Ž & 𝑏 \\ 𝑐 & 𝑑\end{bmatrix}
(3.18)

A brace is the same object with a different fence. I use it when I am about to write a piecewise linear map.

{1234}\begin{Bmatrix}1 & 2 \\ 3 & 4\end{Bmatrix}
(3.19)

The identity is the first 3Γ—33\times 3 I actually type:

(100010001)\begin{pmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{pmatrix}
(3.20)

Entries that are not integers. If fractions in a cell collapse, the matrix is a lie.

(11213121314131415)\begin{pmatrix}1 & \frac{1}{2} & \frac{1}{3} \\ \frac{1}{2} & \frac{1}{3} & \frac{1}{4} \\ \frac{1}{3} & \frac{1}{4} & \frac{1}{5}\end{pmatrix}
(3.21)

A rotation in the plane, sines sitting next to cosines:

(cosβ‘ΞΈβˆ’sin⁑θsin⁑θcos⁑θ)\begin{pmatrix}\cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}
(3.22)

A column is a matrix with one column. I write vectors that way when I am about to multiply.

(π‘₯𝑦𝑧)\begin{pmatrix}π‘₯ \\ 𝑦 \\ 𝑧\end{pmatrix}
(3.23)

A row is the other way around:

(π‘₯𝑦𝑧)\begin{pmatrix}π‘₯ & 𝑦 & 𝑧\end{pmatrix}
(3.24)

Determinant bars are a delimiter, not a new object:

βˆ£π‘Žπ‘π‘π‘‘βˆ£=π‘Žπ‘‘βˆ’π‘π‘\begin{vmatrix}π‘Ž & 𝑏 \\ 𝑐 & 𝑑\end{vmatrix}=π‘Žπ‘‘-𝑏𝑐
(3.25)

The 3Γ—33\times 3 determinant I will actually expand, not a 2Γ—22\times 2 again:

βˆ£π‘Žπ‘π‘π‘‘π‘’π‘“π‘”hπ‘–βˆ£=π‘Ž(π‘’π‘–βˆ’π‘“h)βˆ’π‘(π‘‘π‘–βˆ’π‘“π‘”)+𝑐(𝑑hβˆ’π‘’π‘”)\begin{vmatrix}π‘Ž & 𝑏 & 𝑐 \\ 𝑑 & 𝑒 & 𝑓 \\ 𝑔 & h & 𝑖\end{vmatrix}=π‘Ž(𝑒𝑖-𝑓h)-𝑏(𝑑𝑖-𝑓𝑔)+𝑐(𝑑h-𝑒𝑔)
(3.26)

Binomial coefficients are the other array that is not a matrix. I need them for Taylor remainders.

(π‘›π‘˜)=𝑛!π‘˜!(π‘›βˆ’π‘˜)!\binom{𝑛}{π‘˜}=\frac{𝑛!}{π‘˜!(𝑛-π‘˜)!}
(3.27)

The binomial theorem, because a sum of binomials is the reason I wanted the symbol:

(π‘₯+𝑦)𝑛=βˆ‘π‘˜=0𝑛(π‘›π‘˜)π‘₯π‘›βˆ’π‘˜π‘¦π‘˜{(π‘₯+𝑦)}^{𝑛}=\sum _{π‘˜=0}^{𝑛}\binom{𝑛}{π‘˜}{π‘₯}^{𝑛-π‘˜}{𝑦}^{π‘˜}
(3.28)

A 2Γ—22\times 2 block acting on a vector is the linear system from (3.5) written as one product:

(π‘₯′𝑦′)=(π‘Žπ‘π‘π‘‘)(π‘₯𝑦)\begin{pmatrix}{π‘₯}^{\prime } \\ {𝑦}^{\prime }\end{pmatrix}=\begin{pmatrix}π‘Ž & 𝑏 \\ 𝑐 & 𝑑\end{pmatrix}\begin{pmatrix}π‘₯ \\ 𝑦\end{pmatrix}
(3.29)

The three-dimensional version, so a converter cannot special-case a 2Γ—22\times 2:

(π‘₯′𝑦′𝑧′)=(π‘Ž11π‘Ž12π‘Ž13π‘Ž21π‘Ž22π‘Ž23π‘Ž31π‘Ž32π‘Ž33)(π‘₯𝑦𝑧)\begin{pmatrix}{π‘₯}^{\prime } \\ {𝑦}^{\prime } \\ {𝑧}^{\prime }\end{pmatrix}=\begin{pmatrix}{π‘Ž}_{11} & {π‘Ž}_{12} & {π‘Ž}_{13} \\ {π‘Ž}_{21} & {π‘Ž}_{22} & {π‘Ž}_{23} \\ {π‘Ž}_{31} & {π‘Ž}_{32} & {π‘Ž}_{33}\end{pmatrix}\begin{pmatrix}π‘₯ \\ 𝑦 \\ 𝑧\end{pmatrix}
(3.30)

An augmented matrix, because a linear system is a matrix with a bar I did not invent:

[123|1014|0001|2]\begin{bmatrix}1 & 2 & 3 & \text{|} & 1 \\ 0 & 1 & 4 & \text{|} & 0 \\ 0 & 0 & 1 & \text{|} & 2\end{bmatrix}
(3.31)

The inverse of a 2Γ—22\times 2, written as a scalar times a matrix, not as a wish:

(π‘Žπ‘π‘π‘‘)βˆ’1=1π‘Žπ‘‘βˆ’π‘π‘(π‘‘βˆ’π‘βˆ’π‘π‘Ž){\begin{pmatrix}π‘Ž & 𝑏 \\ 𝑐 & 𝑑\end{pmatrix}}^{-1}=\frac{1}{π‘Žπ‘‘-𝑏𝑐}\begin{pmatrix}𝑑 & -𝑏 \\ -𝑐 & π‘Ž\end{pmatrix}
(3.32)

Transpose and a conjugate transpose on the same line:

𝐴=(π‘Žπ‘π‘π‘‘),𝐴𝑇=(π‘Žπ‘π‘π‘‘),π΄βˆ—=(𝐴𝑇)βˆ—π΄=\begin{pmatrix}π‘Ž & 𝑏 \\ 𝑐 & 𝑑\end{pmatrix},\quad {𝐴}^{𝑇}=\begin{pmatrix}π‘Ž & 𝑐 \\ 𝑏 & 𝑑\end{pmatrix},\quad {𝐴}^{\ast }={({𝐴}^{𝑇})}^{\ast }
(3.33)

Jacobian of a map R2β†’R2{\mathbb{R}}^{2}\to {\mathbb{R}}^{2}. Mixed partials live in the cells.

𝐷𝑓=(βˆ‚π‘“1βˆ‚π‘₯βˆ‚π‘“1βˆ‚π‘¦βˆ‚π‘“2βˆ‚π‘₯βˆ‚π‘“2βˆ‚π‘¦)𝐷𝑓=\begin{pmatrix}\frac{\partial {𝑓}_{1}}{\partial π‘₯} & \frac{\partial {𝑓}_{1}}{\partial 𝑦} \\ \frac{\partial {𝑓}_{2}}{\partial π‘₯} & \frac{\partial {𝑓}_{2}}{\partial 𝑦}\end{pmatrix}
(3.34)

Hessian of a scalar, so second derivatives have to sit in a grid:

𝐻𝑓=(βˆ‚2π‘“βˆ‚π‘₯2βˆ‚2π‘“βˆ‚π‘₯βˆ‚π‘¦βˆ‚2π‘“βˆ‚π‘¦βˆ‚π‘₯βˆ‚2π‘“βˆ‚π‘¦2)𝐻𝑓=\begin{pmatrix}\frac{{\partial }^{2}𝑓}{\partial {π‘₯}^{2}} & \frac{{\partial }^{2}𝑓}{\partial π‘₯\partial 𝑦} \\ \frac{{\partial }^{2}𝑓}{\partial 𝑦\partial π‘₯} & \frac{{\partial }^{2}𝑓}{\partial {𝑦}^{2}}\end{pmatrix}
(3.35)

Vandermonde, because a power in a cell is not the same as a superscript on the whole matrix:

(1π‘₯1π‘₯121π‘₯2π‘₯221π‘₯3π‘₯32)\begin{pmatrix}1 & {π‘₯}_{1} & {π‘₯}_{1}^{2} \\ 1 & {π‘₯}_{2} & {π‘₯}_{2}^{2} \\ 1 & {π‘₯}_{3} & {π‘₯}_{3}^{2}\end{pmatrix}
(3.36)

Pauli matrices. If 𝑖𝑖 becomes italic garbage, I will notice.

Οƒ1=(0110),Οƒ2=(0βˆ’π‘–π‘–0),Οƒ3=(100βˆ’1){\sigma }_{1}=\begin{pmatrix}0 & 1 \\ 1 & 0\end{pmatrix},\quad {\sigma }_{2}=\begin{pmatrix}0 & -𝑖 \\ 𝑖 & 0\end{pmatrix},\quad {\sigma }_{3}=\begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix}
(3.37)

A block matrix, letters standing for blocks I have not opened:

[𝐴𝐡𝐢𝐷][π‘₯𝑦]=[𝐴π‘₯+𝐡𝑦𝐢π‘₯+𝐷𝑦]\begin{bmatrix}𝐴 & 𝐡 \\ 𝐢 & 𝐷\end{bmatrix}\begin{bmatrix}π‘₯ \\ 𝑦\end{bmatrix}=\begin{bmatrix}𝐴π‘₯+𝐡𝑦 \\ 𝐢π‘₯+𝐷𝑦\end{bmatrix}
(3.38)

The characteristic polynomial as a determinant, Ξ»\lambda in the diagonal cells:

det⁑(π΄βˆ’Ξ»πΌ)=βˆ£π‘Žβˆ’Ξ»π‘π‘π‘‘βˆ’Ξ»βˆ£=(π‘Žβˆ’Ξ»)(π‘‘βˆ’Ξ»)βˆ’π‘π‘\det (𝐴-\lambda 𝐼)=\begin{vmatrix}π‘Ž-\lambda & 𝑏 \\ 𝑐 & 𝑑-\lambda \end{vmatrix}=(π‘Ž-\lambda )(𝑑-\lambda )-𝑏𝑐
(3.39)

Cases are an array with a brace. Absolute value is the smallest example I already used; here is a flux that changes sign.

𝑓(π‘₯)={π‘₯2 if π‘₯β‰₯0βˆ’π‘₯2 if π‘₯<0𝑓(π‘₯)=\begin{cases}{π‘₯}^{2}\, & \text{if}\, π‘₯\geq 0 \\ -{π‘₯}^{2}\, & \text{if}\, π‘₯<0\end{cases}
(3.40)

Three branches. Two is not a gauntlet.

sgn(π‘₯)={1 if π‘₯>00 if π‘₯=0βˆ’1 if π‘₯<0\text{sgn}(π‘₯)=\begin{cases}1\, & \text{if}\, π‘₯>0 \\ 0\, & \text{if}\, π‘₯=0 \\ -1\, & \text{if}\, π‘₯<0\end{cases}
(3.41)

Heaviside, written as a step I will integrate against:

𝐻(π‘₯)={0 if π‘₯<01 if π‘₯β‰₯0𝐻(π‘₯)=\begin{cases}0\, & \text{if}\, π‘₯<0 \\ 1\, & \text{if}\, π‘₯\geq 0\end{cases}
(3.42)

A piecewise ODE, because a system can change formula across a threshold:

π‘₯β€²={βˆ’π‘₯ ifβ€‰βˆ£π‘₯∣>1βˆ’π‘₯3 ifβ€‰βˆ£π‘₯βˆ£β‰€1{π‘₯}^{\prime }=\begin{cases}-π‘₯\, & \text{if}\, |π‘₯|>1 \\ -{π‘₯}^{3}\, & \text{if}\, |π‘₯|\leq 1\end{cases}
(3.43)