Lcm of two numbers is a lot like the direct sum of two vector spaces. I was reading this Category Theory paper and in the beginning it talks about finding connections between different parts of math. One of the examples is that how the lcm of two numbers is a lot like the direct sum of two vector spaces. I am familiar with linear algebra at the level of Axler and also real analysis. This statements sounds very intriguing. But I feel like I don’t have the background to understand the proof or the machinery of why this statement is true.
Could someone explain how this works and why is there this connection between these two concepts?
 A: Fix a field $F$, and consider all vector spaces over $F$ and linear transformations between them. Given two vector spaces $V$ and $W$, the direct sum $V\oplus W$ has the following properties:

*

*There exist linear transformations $i_V\colon V\to V\oplus W$ and $i_W\colon W\to V\oplus W$; (namely, $i_V(v)= (v,0_W)$, $i_W(w) = (0_V,w)$).

*For any vector space $Z$ and linear transformations $T\colon V\to Z$ and $U\colon W\to Z$, there exists a unique linear transformation $L\colon V\oplus W\to Z$ such that $T = L\circ i_V$ and $U=L\circ i_W$. Namely, $L(v,w)=T(v)+U(w)$.

*The direct sum is characterized up to isomorphism by properties 1 and 2: if $X$ is any vector space, and $j_V\colon V\to X$ and $j_W\colon W\to X$ are linear transformations such that for every vector space $Z$ and linear transformations $T\colon V\to Z$ and $U\colon W\to Z$ there exists a unique linear tranformation $M\colon X\to Z$ such that $T=M\circ j_V$ and $U=M\circ j_W$, then there is a unique linear isomorphism $\Phi\colon V\oplus W\to X$ such that $j_V=\Phi\circ i_V$ and $j_W=\Phi\circ i_W$.

To see 3, note that the existence of $j_V$ and $j_W$ imply the existence of a unique linear transformation $\Phi\colon V\oplus W\to X$ with $j_V=\Phi\circ i_V$ and $j_W=\Phi\circ i_W$ by 2; we need to show $\Phi$ is an isomorphism. The existence of $i_V$ and $i_W$ imply, by the properties we are assuming $X$ has, the existence of a linear transformation $\Psi\colon X\to V\oplus W$ such that $i_V=\Psi\circ j_V$ and $i_W=\Psi\circ j_W$. Then the map $\Psi\circ\Phi\colon V\oplus W\to V\oplus W$ satisfies $i_V=(\Psi\circ\Phi)\circ i_V$ and $i_W=(\Psi\circ\Phi)\circ i_W$. But so does the map $\mathrm{id}_{V\oplus W}$. The fact that in 2 we have that there is a unique map that satisfies this condition tells us that $\Psi\circ\Phi=\mathrm{id}_{V\oplus W}$. Now repeat the argument exchanging the roles of $X$ and $V\oplus W$ to conclude that $\Phi\circ\Psi=\mathrm{id}_X$. So $\Phi=\Psi^{-1}$ are both invertible, and we are done.

Consider now the nonzero integers (zero is a bit problematic, so let us leave it aside for a second). If $a$ and $b$ are integers, then the lcm of $a$ and $b$ has the following properties:

*

*There exist integers $r$ and $t$ such that $ar=\mathrm{lcm}(a,b)$ and $bt=\mathrm{lcm}(a,b)$.

*For every integer $x$, if there are integers $m$ and $n$ such that $am=x$ and $bn=x$, then there exists a unique integer $k$ such that $\mathrm{lcm}(a,b)k=x$, and $m=kr$, $n=kt$.

*Properties 1 and 2 characterize $\mathrm{lcm}(a,b)$ up to sign: if $M$ is an integer such that there exist integers $R$ and $T$ such that $aR=M$, $bT=M$, and for every integer $x$, if there are integers $u$ and $v$ such that $au=x$ and $bv=x$, then there exists a unique integer $K$ such that $MK=x$, and $u=KR$, $v=KT$; then $M=\pm\mathrm{lcm}(a,b)$.

Property 2 is straightforward, so let me note how to show property 3 along the same lines as above for vector spaces: suppose we have $M$, $R$, and $T$ as in 3. By property 2, there exists a unique integer $k$ such that $\mathrm{lcm}(a,b)k=M$. But by 1, the property of $M$ in 3 tells us that there is a unique integer $K$ such that $MK=\mathrm{lcm}(a,b)$. Now, $M=KkM$, so $Kk=1$, which implies that $K=k=\pm 1$. Thus, $M=\pm\mathrm{lcm}(a,b)$.
Now, to make the analogy clearer, imagine you have all the integers. If $a$ and $m$ are integers, then draw an arrow from $a$ to $m$ labeled with the integer $x$ if and only if $ax=m$. If $a$ does not divide $m$, then there is no arrow from $a$ to $m$.
Then property 1 above can be rewritten as:

There is an arrow $a\stackrel{r}{\longrightarrow}\mathrm{lcm}(a,b)$, and an arrow $b\stackrel{t}{\longrightarrow}\mathrm{lcm}(a,b)$.

And property 2 can be rewritten as:

If there are arrows $a\stackrel{m}{\longrightarrow}x$ and $b\stackrel{n}{\longrightarrow}x$, then there exists a unique arrow $\mathrm{lcm}(a,b)\stackrel{k}{\longrightarrow}x$ such that
$$\stackrel{m}{\longrightarrow} = \stackrel{r}{\longrightarrow}\,\stackrel{k}{\longrightarrow}\qquad\text{and}\qquad \stackrel{n}{\longrightarrow} = \stackrel{t}{\longrightarrow}\,\stackrel{k}{\longrightarrow}.$$


So $V\oplus W$ can be characterized, up to isomorphism, in terms of properties related to linear transformations among vector spaces related to $V$ and $W$. And $\mathrm{lcm}(a,b)$ can be characterized, up to sign, in terms of properties related to labeled arrows among integers related to $a$ and $b$. Moreover, the characterizations of each is very similar (if not almost identical) to the other, when viewed solely in terms of existence and uniqueness of these transformations/arrows.
Thus, we can say there is an analogy between the way $V\oplus W$ behaves, relative to (i) $V$ and $W$, (ii) the linear maps $V\to V\oplus W$ and $W\to V\oplus W$, and (iii) all other vector spaces and linear transformations; and the way that $\mathrm{lcm}(a,b)$ behaves, realtive to (i) $a$ and $b$; (ii) the integers $r$ and $t$ such that $ar=\mathrm{lcm}(a,b)$, $bt=\mathrm{lcm}(a,b)$; and (iii) all other integers and divisibility/multiplication of integers. In addition, notice how similar the proofs of items 3, in terms of items 1 and 2 in the properties listed, were; that proof did not really rely on the fact that we had vector spaces and linear transformations, or integers and divisibility statements, but really on just the existence and uniqueness of certain linear transformations/arrows.
In fact, both are instances of what are called coproducts in their respective categories. Category Theory thrives in noticing and abstracting these kinds of similarities among sundry and diverse settings.
