<<

Emily Riehl

Johns Hopkins University

The Yoneda lemma in the of Matrices

Dedicated to Fred E. J. Linton (1938-휖–2017) ACT 2020 Tutorial Day The category of Matrices A category has objects and arrows and a composition law satisfying identity and associativity axioms. The category of matrices Mat has ● natural numbers 0, 1, 2,…, 푗, 푘, ℓ, 푚, 푛,… as its objects, 퐴 ● matrices as its arrows: an arrow 푚 ←Ð 푛 is an 푚 × 푛 matrix 퐴, ● the composite of a ℓ × 푚 and a 푚 × 푛 matrix defined by matrix multiplication 푚 푛 ⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞ 푚 ⎛ ⎞ ⎛ ⎞ 퐵 퐴 ℓ{ ⎜ 퐵 ⎟ ⋅ 푚{ ⎜ 퐴 ⎟ ℓ 푛 ⎝ ⎠ ⎝ ⎠ 퐵⋅퐴

퐼푛 ● with the identity arrow 푛 ←Ð 푛 given by the identity matrix ⋯ ⎛1 0 0⎞ ⎜ ⎟ ⎜0 1 ⋱ ⋮ ⎟ ⎜ ⎟ ⎜ ⋮ ⋱ ⋱ 0⎟ ⎝0 ⋯ 0 1⎠ Column

In the category of matrices Mat ● objects are natural numbers …, 푗, 푘, ℓ, 푚, 푛,… and 퐴 ● an arrow 푚 ←Ð 푛 is an 푚 × 푛 matrix 퐴.

For each 푘, the set of all matrices with 푘 columns is organized by the data of the 푘-column ℎ푘∶ Mat → Set, which is given by: ● 퐶 a set ℎ푘(푛) = {푛 × 푘 matrices} = {푛 ←Ð 푘} for each 푛 퐴 퐴 ● a ℎ(푚) ←Ð ℎ(푛) for each matrix 푚 ←Ð 푛 given by left multiplication:

푛 푘 푘 ⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ 푚{ ⎜ 퐴 ⎟ ⋅ 푛{ ⎜ 퐶 ⎟ ↤ 푛{ ⎜ 퐶 ⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

This data satisfies the axioms of functoriality. Column functors are functorial The set of all matrices with 푘-columns defines the 푘-column functor: ● 퐶 a set ℎ푘(푛) = {푛 × 푘 − matrices} = {푛 ←Ð 푘} ● 퐴 a function ℎ푘(푚) ←Ð ℎ푘(푛) given by left multiplication by a matrix 퐴 푚 ←Ð 푛 This data satisfies the axioms of functoriality: 퐼 ● 푛 ℎ푘(푛) ←Ð ℎ푘(푛) is the identity function 퐴 퐵 ● for any matrices 푚 ←Ð 푛 and ℓ ←Ð 푚:

ℎ푘(푚) 퐵 퐴 ℎ (ℓ) ℎ (푛). 푘 퐵⋅퐴 푘 For any 푛 × 푘 matrix 퐶,

퐼푛 ⋅ 퐶 = 퐶 and 퐵 ⋅ (퐴 ⋅ 퐶) = (퐵 ⋅ 퐴) ⋅ 퐶. Naturally-defined column operations on column functors The set of all matrices with 푘-columns defines the 푘-column functor: ● 퐶 a set ℎ푘(푛) = {푛 × 푘 − matrices} = {푛 ←Ð 푘} ● 퐴 a function ℎ푘(푚) ←Ð ℎ푘(푛) given by left multiplication by a matrix 퐴 푚 ←Ð 푛

ℎ푘 ℎ푘(푛)

A 훼 is given by a function 훼푛 for each 푛

ℎ푗 ℎ푗(푛) 퐴 so that for each matrix 푚 ←Ð 푛 the diagram of functions commutes: 퐴 ℎ푘(푚) ℎ푘(푛)

훼푚 훼푛 ℎ (푚) ℎ (푛) 푗 퐴 푗 This says that “훼 is a naturally-defined operation on column functors.” Projection operations on column functors

ℎ푘 ℎ푘(푛)

A natural transformation 훼 is given by a function 훼푛 for each 푛

ℎ푗 ℎ푗(푛) that encodes a naturally-defined operation on column functors.

ℎ푘

Example: There is an operation 휋 that deletes the 푘th column.

ℎ푘−1 퐴 Naturality in 푚 ←Ð 푛: 푘 푘 ⏞⏞⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞ 푚{ ((퐴퐶)1⋯(퐴퐶)푘) ↤ 푛{ (퐶1⋯퐶푘) ↧ ↧ 푘−1 푘−1 푘−1 ⏞⏞⏞⏞⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞ 푚{ ((퐴퐶)1⋯(퐴퐶)푘−1) = 푚{ (퐴) ⋅ (퐶1⋯퐶푘−1) ↤ 푛{ (퐶1⋯퐶푘−1) Inclusion operations on column functors

ℎ푘 ℎ푘(푛)

A natural transformation 훼 is given by a function 훼푛 for each 푛

ℎ푗 ℎ푗(푛) that encodes a naturally-defined operation on column functors.

ℎ푘

Example: There is an operation 휄 that appends a column of zeros.

ℎ푘+1 퐴 Naturality in 푚 ←Ð 푛: 푘 푘 ⏞⏞⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞ 푚{ ((퐴퐶)1⋯(퐴퐶)푘) ↤ 푛{ (퐶1⋯퐶푘) ↧ ↧ 푘+1 푘+1 푘+1 ⏞⏞⏞⏞⏞⏞⏞⏞⏞⃗ ⏞⏞⏞⏞⏞⏞⏞⃗ ⏞⏞⏞⏞⏞⃗ 푚{ ((퐴퐶)1⋯(퐴퐶)푘0) = 푚{ (퐴) ⋅ (퐶1⋯퐶푘0) ↤ 푛{ (퐶1⋯퐶푘0) Classifying column operations

ℎ푘

Challenge: Describe all natural transformations 훼

ℎ푗

In other words:

Challenge: Classify all naturally-defined column operations that transform matrices with 푘 columns into matrices with 푗 columns. The Yoneda lemma in the category of Matrices

Yoneda Lemma: ℎ푘 1. Every naturally-defined column operation 훼 is determined by a

single 푘 × 푗 matrix. ℎ푗

훼푘(퐼푘) 2. This 푘 × 푗 matrix 푘 ←ÐÐÐ 푗 is obtained by applying the column ℎ (푘) 푘 퐼푘 operation 훼푘 to the identity matrix 푘 ←Ð 푘.

ℎ푗(푘) ℎ푘(푛)

3. The column operation 훼푛 is given by right multiplication by 훼푘(퐼푘) ℎ (푛) the matrix 푘 ←ÐÐÐ 푗. 푗 푘 푗 ⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞⏞⏞ ⎛ ⎞ ⎛ ⎞ 훼푛(퐶) ≔ 푛{ ⎜ 퐶 ⎟ ⋅ 푘{ ⎜ 훼푘(퐼푘) ⎟ ⎝ ⎠ ⎝ ⎠ 푀 4. Every matrix 푘 ←Ð 푗 determines a naturally-defined column operation defined by right multiplication. operations on column functors

ℎ푘 Yoneda Lemma: Every naturally-defined column operation 훼 is given

ℎ푗 훼푘(퐼푘) by right multiplication by the matrix 푘 ←ÐÐÐ 푗 obtained by applying the 퐼푘 column operation 훼푘 to the identity matrix 푘 ←Ð 푘, and every 푘 × 푗 matrix determines a naturally-defined column operation in this way.

ℎ푘 Example: The operation 휎 that swaps the first two columns is

ℎ푘 defined by right multiplication by the matrix 0 1 0 ⋯ 0 ⎛1 0 0 ⋱ ⋮ ⎞ ⎜ ⎟ 휎 (퐼 ) = ⎜0 0 1 ⋱ ⋮ ⎟ 푘 푘 ⎜ ⎟ ⎜ ⋮ ⋱ ⋱ ⋱ 0⎟ ⎝0 ⋯ ⋯ 0 1⎠ Multiplication operations on column functors

ℎ푘 Yoneda Lemma: Every naturally-defined column operation 훼 is given

ℎ푗 훼푘(퐼푘) by right multiplication by the matrix 푘 ←ÐÐÐ 푗 obtained by applying the 퐼푘 column operation 훼푘 to the identity matrix 푘 ←Ð 푘, and every 푘 × 푗 matrix determines a naturally-defined column operation in this way.

ℎ푘 Example: The operation 휇 that multiplies the first column by a scalar

ℎ푘 휆 is defined by right multiplication by the matrix: 휆 0 0 ⋯ 0 ⎜⎛ ⎟⎞ ⎜0 1 0 ⋱ ⋮ ⎟ ⎜ ⎟ 휇푘(퐼푘) = ⎜0 0 1 ⋱ ⋮ ⎟ ⎜ ⎟ ⎜ ⋮ ⋱ ⋱ ⋱ 0⎟ ⎝0 ⋯ ⋯ 0 1⎠ Column addition operations on column functors

ℎ푘 Yoneda Lemma: Every naturally-defined column operation 훼 is given

ℎ푗 훼푘(퐼푘) by right multiplication by the matrix 푘 ←ÐÐÐ 푗 obtained by applying the 퐼푘 column operation 훼푘 to the identity matrix 푘 ←Ð 푘, and every 푘 × 푗 matrix determines a naturally-defined column operation in this way.

ℎ푘 Example: The operation 훼 that adds the first column to the second

ℎ푘 column is defined by right multiplication by the matrix: 1 1 0 ⋯ 0 ⎜⎛ ⎟⎞ ⎜0 1 0 ⋱ ⋮ ⎟ ⎜ ⎟ 훼푘(퐼푘) = ⎜0 0 1 ⋱ ⋮ ⎟ ⎜ ⎟ ⎜ ⋮ ⋱ ⋱ ⋱ 0⎟ ⎝0 ⋯ ⋯ 0 1⎠ Elementary column operations

Corollary of the Yoneda lemma: A naturally-defined column operation ℎ 푘 훼푘(퐼푘) 훼 is invertible if and only if the matrix 푘 ←ÐÐÐ 푘 is invertible.

ℎ푘

The elementary column operations that ● swap two columns, ● multiply a column by a scalar, or ● add a scalar multiple of one column to another column are invertible since the corresponding elementary matrices are invertible. Composite column operations

Corollary of the Yoneda lemma: The composite of two naturally-defined

ℎ푘 훼

column operations ℎ푗 훽훼 is defined by right multiplication by

훽 ℎ푚 the product of the representing matrices:

푚 푗 푚 ⏞⏞⏞⏞⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞⏞⏞ ⏞⏞⏞⏞⏞⏞⏞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ 푘{ ⎜ (훽훼)푘(퐼푘) ⎟ ≔ 푘{ ⎜ 훼푘(퐼푘) ⎟ ⋅ 푗{ ⎜ 훽푗(퐼푗) ⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

In this way the elementary column operations generate all invertible column operations. Unnatural column operations Non-Example: The operation that appends a column of ones is not natural. Applying this operation to the identity matrix yields:

⋯ ⎛1 0 0 1⎞ ⎜ ⎟ ⎜0 1 ⋱ ⋮ ⋮ ⎟ ⎜ ⎟ ⎜ ⋮ ⋱ ⋱ 0 1⎟ ⎝0 ⋯ 0 1 1⎠

but then right multiplication defines a different column operation:

1 0 ⋯ 0 1 ∣ ⋯ ∣ ⎛ ⎞ ∣ ⋯ ∣ ∣ ⎜ ⎟ ⎛ ⎞ ⎜0 1 ⋱ ⋮ ⋮ ⎟ ⎛ ⎞ ⎜퐶1 ⋯ 퐶푘⎟⋅⎜ ⎟ = ⎜퐶1 ⋯ 퐶푘 퐶1 + ⋯ + 퐶푘⎟ ⎜ ⋮ ⋱ ⋱ 0 1⎟ ⎝ ∣ ⋯ ∣ ⎠ ⎜ ⎟ ⎝ ∣ ⋯ ∣ ∣ ⎠ ⎝0 ⋯ 0 1 1⎠

∣ ⋯ ∣ 1 ⎛ ⎞ /= ⎜퐶1 ⋯ 퐶푘 ⋮ ⎟ ⎝ ∣ ⋯ ∣ 1⎠ in context Dedication and acknowledgment

Thank you!