In this section, we are going to talk about constructing vector spaces. We have already seen the example of $k^n$ for $n$ a nonnegative integer. We can generalize this to the case where $n$ is infinite.

Definition 2.4.1

Let $S$ be a set. We define

$$ k^S = \lbrace \text{set of maps } S \to k \rbrace $$

with addition and scalar multiplication

$$ (f + g)(s) = f(s) + g(s), \quad (a \cdot f)(s) = a \cdot f(s) $$

for $f, g \in k^S$, $s \in S$, and $a \in k$.

Exercise 2.4.A

Check that this indeed a $k$-vector space. What is the $0$ vector?

Of course, if $S = \lbrace 1, 2, \ldots, n \rbrace $ we retrieve the vector space $k^n$. But if $S$ is much larger, this vector space can be pretty huge. An interesting feature of this construction is that it is functorial. That is, if I have two sets $S_1, S_2$ and a map $\alpha : S_1 \to S_2$ of sets, then I get a map

$$ \alpha^\ast : k^{S_2} \to k^{S_1}; \quad (f : S_2 \to k) \mapsto (f \circ \alpha : S_1 \to k). $$

It is clear from the definition that if $\alpha : S_1 \to S_2$ and $\beta : S_2 \to S_3$ are maps between sets, then $(\beta \circ \alpha)^\ast = \alpha^\ast \circ \beta^\ast$.

Exercise 2.4.B

Show that $\alpha^\ast$ is always $k$-linear.

Although this construction is a natural generalization of $k^n$, there is a slightly different construction that is more important in studying vector spaces.

Definition 2.4.2

Let $S$ be a set. We define the free vector space on $S$ as

$$ k^{\oplus S} = \lbrace \text{set of maps } f : S \to k \text{ such that } f(s) \neq 0 \text{ only for finitely many } s \rbrace , $$

with addition and scalar multiplication

$$ (f + g)(s) = f(s) + g(s), \quad (a \cdot f)(s) = a \cdot f(s) $$

for $f, g \in k^{\oplus S}$, $s \in S$, and $a \in k$.

Clearly, if $S$ is finite, the two vector spaces $k^S$ and $k^{\oplus S}$ agree, because anyhow there can be only finitely many $s$ such that $f(s) \neq 0$. But if $S$ is infinite, the vector space $k^{\oplus S}$ is strictly contained in $k^S$.

Exercise 2.4.C

Check that this is indeed a $k$-vector space. (Here you need to show that if $f$ and $g$ satisfy the “finiteness of nonzero values” condition, then $f + g$ and $a \cdot f$ satisfy the condition as well.)

This construction deserves more explanation, as it might seem unmotivated to only take functions with finite nonzero values. For each $s \in S$, there is a function $S \to k$ that sends $s$ to $1 \in k$ and all other elements to $0 \in k$. This satisfies the finiteness condition, and hence is an element of $k^{\oplus S}$. We shall denote it by $\underline{s} \in k^{\oplus S}$, so that

$$ \underline{s}(s^\prime) = \begin{cases} 1 & s^\prime = s \\ 0 & s^\prime \neq s. \end{cases} $$

These vectors are supposed to be like $e_i \in k^n$. For pairwise distinct elements $s_1, \ldots, s_m \in S$ and nonzero scalars $a_1, \ldots, a_m \in k$, we can form the sum

$$ v = a_1 \underline{s_1} + a_2 \underline{s_2} + \cdots + a_m \underline{s_m} \in k^{\oplus S}. $$

The vector $v$, regarded as a map $S \to k$, sends $s_j$ to $a_j$ and all other $s \in S$ to $0$. In fact, every vector $v \in k^{\oplus S}$ can be written like this sum because $v$ is nonzero only on a finite number of $s$. Moreover such a presentation of $v$ as a linear combination of $\underline{s}$ is unique. So this is the “freest” vector space you can get by regarding elements of $S$ as symbols. (You're never allowed to add infinitely many vectors at once, because addition is only defined on two elements.)

This vector space enjoys a universal property. For any set $S$, there exists a natural (set) map

$$ \iota : S \to k^{\oplus S}; \quad s \mapsto \underline{s}. $$

(Because $S$ is a set, it does not make sense to ask if this map is linear or not.) The map $\iota$ is always injective, because $s \neq s^\prime$ implies $\underline{s} \neq \underline{s^\prime}$. (To see this, note that $\underline{s}(s) = 1$ while $\underline{s^\prime}(s) = 0$.)

Proposition 2.4.3(Universal property for free vector spaces)

Let $S$ be a set, and let $V$ be an arbitrary $k$-vector space. If $f : S \to V$ is any (set) map, there exists a unique linear map $T : k^{\oplus S} \to V$ that extends $f$, that is, $f = T \circ \iota$.

Commutative triangle expressing the universal property of the free vector space.

S maps to V by f and injects into the free vector space on S by iota. The unique dashed linear map T goes from the free vector space to V, and its composite with iota equals f.

The intuition is that once we choose where $\underline{s}$ are sent into $V$, it is also uniquely determined where their finite linear combinations $a_1 \underline{s_1} + \cdots + a_n \underline{s_n}$ are sent to $a_1 f(s_1) + \cdots + a_n f(s_n)$.

Proof.

We first prove uniqueness. Recall that an element of $k^{\oplus S}$ is formally a map $S \to k$ that is $0$ except on a finite number of elements of $S$. Then we can write any element $\alpha \in k^{\oplus S}$ as

$$ \alpha = \sum_{s \in S}^{} \alpha(s) \underline{s}, $$

where $\alpha(s) \neq 0$ for finitely many $s$ ensures that the right hand side is a finite sum. Suppose that a linear map $T : k^{\oplus S} \to V$ satisfies the condition $f = T \circ \iota$. From this condition, we see that $f(s) = T(\iota(s)) = T(\underline{s})$. So by linearity of $T$, we get

$$ T(\alpha) = T\biggl(\sum_{s \in S}^{} \alpha(s) \underline{s}\biggr) = \sum_{s \in S}^{} \alpha(s) T(\underline{s}) = \sum_{s \in S}^{} \alpha(s) f(s). $$

That is, $T$ is uniquely determined to be function.

To show existence, we only need to check that the $T$ we defined above is indeed linear and satisfies the condition $f = T \circ \iota$. This can be easily checked.

Another way to state this proposition is that there is a natural correspondence

$$ \Mor_{\mathsf{Set}}(S, V) = \lbrace \text{set maps } S \to V \rbrace \quad \longleftrightarrow \quad \lbrace \text{linear maps } k^{\oplus S} \to V \rbrace , $$

where one direction of the correspondence is given by composing with the map $\iota : S \to k^{\oplus S}$.

We have previously seen that a set map $\alpha : S_1 \to S_2$ induced a map

$$ \alpha^\ast : k^{S_2} \to k^{S_1}; \quad (f : S_2 \to k) \mapsto (f \circ \alpha : S_1 \to k) $$

in the other direction. Can this construction be done for $k^{\oplus S_2} \to k^{\oplus S_1}$ as well?

Exercise 2.4.D

Show that the map

$$ \alpha^\ast : k^{\oplus S_2} \to k^{\oplus S_1}; \quad (f : S_2 \to k) \mapsto (f \circ \alpha : S_1 \to k) $$

is not a well-defined map. What is the problem here?

But we can do the following. Consider the map

$$ c = \iota_{S_2} \circ \alpha : S_1 \to k^{\oplus S_2}; \quad s \mapsto \underline{\alpha(s)}. $$

By Proposition 2.4.3, this uniquely induces a linear map

$$ \alpha_\ast : k^{\oplus S_1} \to k^{\oplus S_2} $$

such that $c = \alpha_\ast \circ \iota_{S_1}$, i.e., $\alpha_\ast(\underline{s}) = \underline{\alpha(s)}$. This can also be drawn as

Commutative square for the linear map induced by a map of sets.

S one maps to S two by alpha. Each set maps vertically to its free vector space by iota. The diagonal map c equals the two-step composites, and the dashed bottom arrow is the induced linear map alpha sub star.

Exercise 2.4.E

Check that if $\alpha : S_1 \to S_2$ and $\beta : S_2 \to S_3$ are (set) maps, then $(\beta \circ \alpha)_\ast = \beta_\ast \circ \alpha_\ast$.


Let us now consider two $k$-vector spaces $V$ and $W$. We can look at their product

$$ V \times W = \lbrace (v, w) : v \in V, w \in W \rbrace $$

as sets, but this set can naturally be given a structure of a $k$-vector space.

Definition 2.4.4

Given two vector spaces $V$ and $W$, we define their product as $V \times W$ with addition and multiplication

$$ (v_1, w_1) + (v_2, w_2) = (v_1 + v_2, w_1 + w_2), \quad c (v, w) = (c v, c w). $$

Exercise 2.4.F

Check that this satisfies all the axioms of a vector space. What is the $0$ vector?

For instance, $k^2 \times k^3$ can naturally be identified with $k^5$ via the correspondence

$$ ((a_1, a_2), (b_1, b_2, b_3)) \; \leftrightarrow \; (a_1, a_2, b_1, b_2, b_3). $$

As with sets, we can also define infinite products in the exact same way.

Definition 2.4.5

Let $\lbrace V_i \rbrace _{i \in I}$ be a set of vector spaces, where $I$ is the indexing set. We define their product as

$$ \prod_{i \in I}^{} V_i = \lbrace (v_i)_{i \in I} : v_i \in V_i \rbrace $$

with addition and multiplication

$$ (v_i)_{i \in I} + (w_i)_{i \in I} = (v_i + w_i)_{i \in I}, \quad c (v_i)_{i \in I} = (c v_i)_{i \in I}. $$

Again, it is straightforward to check that this satisfies all the axioms of a vector space, and is thus a vector space.

Exercise 2.4.G

For $S$ a set, show that $k^S$ is naturally isomorphic to $\prod_{s \in S}^{} k$. So this product is a generalization of the previous construction.

For each $i_0 \in I$, there are (set) maps

$$ \pi_{i_0} : \prod_{i \in I}^{} V_i \to V_{i_0}; \quad (v_i)_{i \in I} \mapsto v_{i_0}, $$

and furthermore they are also linear. This is because

$$ \begin{aligned} \pi_{i_0}((v_i) + (w_i)) &= \pi_{i_0}((v_i + w_i)) = v_{i_0} + w_{i_0} = \pi_{i_0}((v_i)) + \pi_{i_0}((w_i)), \\ \pi_{i_0}( c (v_i)) &= \pi_{i_0}((c v_i)) = c v_{i_0} = c \pi_{i_0}((v_i)). \end{aligned} $$

Proposition 2.4.6(Universal property for products)

Let $\lbrace V_i \rbrace _{i \in I}$ be a set of $k$-vector spaces. For an arbitrary $k$-vector space $W$ and linear maps $f_i : W \to V_i$, there exists a unique linear map $f : W \to \prod_{i \in I}^{} V_i$ such that $f_{i_0} = \pi_{i_0} \circ f$ for each $i_0 \in I$.

Commutative triangle expressing the universal property of a product.

W maps to the product of the V sub i by the unique dashed map f. Projection pi sub i zero from the product to V sub i zero makes the composite equal f sub i zero.

Proof.

First we check that there exists a unique set map $f : W \to \prod_{i \in I}^{} V_i$ such that $f_{i_0} = \pi_{i_0} \circ f$. This is just a general version of Proposition 1.3.1, which can be verified similarly. Here, the map $f$ is going to be defined as

$$ f : w \mapsto (f_i(w))_{i \in I}. $$

Now it suffices to check that $w \mapsto (f_i(w))$ is indeed linear. This is also clear, because the maps $f_i$ are all linear.

Exercise 2.4.H

Fill in the gaps of the previous proof.

This really is the vector space version of Proposition 1.3.1. If $I = \lbrace 1, 2\rbrace $, we can draw the diagram in the following way as well.

Product diagram for two vector spaces.

W maps by a dashed arrow to V one times V two. Its composites with the two projections are f one from W to V one and f two from W to V two.

We can also consider the subspace of the product space consisting only of $(v_i)_{i \in I}$ such that $v_i \neq 0$ only for finitely many $I$. This will be analogue of $k^{\oplus S}$.

Definition 2.4.7

Let $\lbrace V_i \rbrace _{i \in I}$ be a set of $k$-vector spaces. We define their direct sum

$$ \bigoplus_{i \in I} V_i = \lbrace (v_i)_{i \in I} : v_i \in V_i, v_i \neq 0 \text{ only for finitely many } i \in I \rbrace $$

with addition and scalar multiplication

$$ (v_i) + (w_i) = (v_i + w_i), \quad c (v_i) = (c v_i). $$

Exercise 2.4.I

Check again that this is a vector space.

Exercise 2.4.J

For $S$ a set, show that $\bigoplus_{s \in S} k$ is naturally isomorphic to $k^{\oplus S}$.

For each $i_0 \in I$, there is a map

$$ \iota_{i_0} : V_{i_0} \to \bigoplus_{i \in I} V_i; \quad v \mapsto (v_i)_{i \in I} \text{ where } v_i = \begin{cases} v \in V_{i_0} & i = i_0 \\ 0 \in V_i & i \neq i_0. \end{cases} $$

This map is clearly linear, because it is linear in each component.

Proposition 2.4.8(Universal property for direct sums)

Let $\lbrace V_i\rbrace _{i \in I}$ be a set of $k$-vector spaces. For an arbitrary $k$-vector space $W$ and linear maps $f_i : V_i \to W$, there exists a unique linear map $f : \bigoplus_{i \in I} V_i \to W$ such that $f_{i_0} = f \circ \iota_{i_0}$ for each $i_0 \in I$.

Commutative triangle expressing the universal property of a direct sum.

V sub i zero injects into the direct sum by iota sub i zero. The unique dashed map f goes from the direct sum to W, and its composite with the injection equals f sub i zero.

Proof.

For uniqueness, the condition $f_{i_0} = f \circ \iota_{i_0}$ forces

$$ f((v_i)) = f\biggl( \sum_{i \in I}^{} \iota_{i}(v_i) \biggr) = \sum_{i \in I}^{} f(\iota_i(v_i)) = \sum_{i \in I}^{} f_i(v_i). $$

Here, the sums are finite because $v_i \neq 0$ for only finitely many $i$. To show existence, it suffices to check that the above map is linear, but this is straightforward to check.

Exercise 2.4.K

Check the details in the above proof.

Again, if $I = \lbrace 1, 2\rbrace $ the diagram can be drawn as

Coproduct diagram for two vector spaces.

V one and V two inject into V one direct sum V two. A unique dashed map f goes from the direct sum to W, and its composites with the injections are f one and f two.

In view of Exercise 1.3.A, we see that direct sum $\oplus$ for vector spaces works precisely as disjoint union $\amalg$ for sets. Hence the direct sum is also be called the coproduct of vector spaces.

Exercise 2.4.L

Let $\lbrace S_i \rbrace _{i \in I}$ be a set of sets. Show that there is a canonical isomorphism

Canonical isomorphism between a direct sum of free vector spaces and the free vector space on a disjoint union.

The direct sum over i of the free vector spaces on S sub i is canonically isomorphic to the free vector space on the coproduct of the sets S sub i.

(Hint: Show that both satisfy the same universal property. In other words, using universal properties, construct maps in both directions.)

Exercise 2.4.M

Consider linear maps $T : k^n \to k^m$ and $S : k^n \to k^l$. From Proposition 2.4.6, they induce a linear map $M : k^n \to k^m \times k^l \cong k^{m+l}$. When all these maps are considered as matrices, show that

$$ M = \begin{bmatrix} T \\ S \end{bmatrix}. $$

Exercise 2.4.N

Similarly, consider linear maps $T : k^n \to k^l$ and $S : k^m \to k^l$. According to Proposition 2.4.8, they induce a linear map $M : k^{n+m} \cong k^n \oplus k^m \to k^{l}$. When all these maps are considered as matrices, show that

$$ M = \begin{bmatrix} T & S \end{bmatrix}. $$