What Is the Difference Between the Direct Product, Direct Sum, Cartesian Product, and Tensor Product?
Hello, kids. Today we are going to learn what the Cartesian product is. Let $a$ be the set of all tops in the world and $b$ the set of all bottoms. What is the Cartesian product $a \times b$ of $a$ and $b$ ? It is the set of all possible outfits made of one top and one bottom (hats, shoes, and jewelry are not included, of course).
Now we open a shop that sells only tops and call it shop $A$ . We open another shop that sells only bottoms and call it shop $B$ . We can stock shop $A$ with a certain number of each kind of top, and shop $B$ with a certain number of each kind of bottom. The stock of shop $A$ can be written as a list of integers $(a_1,a_2,\cdots,a_m),a_i\in \mathbb{Z}$ . The stock of shop $B$ can also be written as a list of integers $(b_1,b_2,\cdots,b_n),b_i\in \mathbb{Z}$ . Each number is the quantity of one style.
The set of all possible top shops forms a module over a ring. “Ring” means that the number of tops can only be an integer, and the integers form a ring, called the ring of integers. “Module” means that we can add two top shops to get a new top shop, whose stock is the sum of the stocks of the two original shops. We can also subtract one top shop from another. If the number of tops is negative, we say that the shop owes the market that many tops. We can also multiply a top shop by an integer to get a new shop, whose stock is an integer multiple of the original one.
If two shops have exactly the same stock, we say they are the same shop. This is because what we really study is the abstract stock. For convenience, we just let the shop itself stand for its stock.
Everything above also holds for bottom shops. The set of all possible bottom shops also forms a module over a ring.
Selling only tops or only bottoms is not much fun, so we merge shop $A$ and shop $B$ . The direct sum / direct product of shop $A$ and shop $B$ is this new shop. Its stock can now be written as a list of integers $(a_1,a_2,\cdots,a_m,b_1,b_2,\cdots,b_n)$ .
What is the tensor product, then? Now we open an outfit shop. It stocks and sells only complete outfits of one top and one bottom, and never sells a top or a bottom alone. The set of all such outfit shops is the tensor product $A \otimes B$ of $A$ and $B$ . The stock of this new shop has to be written as a table:
$\begin{pmatrix} c_{11} & c_{12} & \cdots & c_{1n} \\\\ c_{21} & c_{22} & \cdots & c_{2n} \\\\ \vdots & \vdots & \ddots & \vdots \\\\ c_{m1} & c_{m2} & \cdots & c_{mn} \end{pmatrix}$
Here $c_{ij}$ is the number of outfits made of the $i$-th style of top and the $j$-th style of bottom.
OK, kids, that is the end of today’s algebra class. Remember to do the after-class reading at home ~ Class dismissed ~
(After-class reading)
Suppose we now open a food shop instead. We replace tops with vegetable dishes and bottoms with meat dishes, and we weigh everything in kilograms. The stock can then be written with real numbers instead of integers. The module over a ring is upgraded to a vector space (over a field), because the real numbers are a field as well as a ring.
Let $A$ be the set of all vegetable shops and $B$ the set of all meat shops. The set of all shops that sell only set meals of one meat dish and one vegetable dish is the tensor product $A \otimes B$ of $A$ and $B$ .
Question 1: What is the set of shops that sell set meals of two meat dishes and one vegetable dish?
Answer: It is not $A \otimes B \otimes B$ . The reason is that we cannot tell which of the two meat shops each meat dish comes from. The correct answer is $A \otimes (B\odot B)$ , where $\odot$ is called the symmetric product.Question 2: If the two meat dishes must be different, what is the set of such shops?
Answer: $A \otimes (B\wedge B)$ , where $\wedge$ is called the exterior product or the wedge product.
The serious explanation follows.
Cartesian Product
The Cartesian product is an operation on sets. The Cartesian product of two sets $A$ and $B$ is defined as $A\times B:=\{(a,b) \mid a\in A \wedge b\in B\}$ . It is that simple (as long as you do not study its rigorous definition in set theory, which is given by the axiom of power set).
Direct Product
The direct product is the same as the Cartesian product, with one difference. The direct product carries the extra structure on the sets (homomorphisms / morphisms), while the Cartesian product concerns only the sets themselves.
For example, for two groups $A $ and $B$ , the direct product is $A \times B$ , with the group operation defined as $(a_1,b_1) \cdot (a_2, b_2) := (a_1 \cdot a_2, b_1 \cdot b_2)$ , where $a_1,a_2 \in A, b_1,b_2\in B$ .
For two vector spaces $A $ and $B$ , a vector space is just an abelian group equipped with scalar multiplication, and its group operation is vector addition. The direct product of vector spaces is therefore defined in the same way as for groups:
$(a_1,b_1) +(a_2,b_2) :=(a_1 + a_2, b_1 + b_2)$
We cannot talk about the direct product of two sets, because a set has no extra structure such as the binary operation of a group. When someone talks about a direct product, the objects are never just sets. They always come with the corresponding operations.
Direct Sum
In most cases the direct sum is exactly the same as the direct product. The difference is subtle and involves category theory. In one sentence, the direct product is a product and the direct sum is a coproduct. For infinite direct products and direct sums, the former allows infinitely many components that are not the identity, while the latter allows only finitely many. See the next section.
Universal Properties of the Direct Product and the Direct Sum
The figure below is a simple sketch of the universal properties of the direct product and the direct sum. To keep things easy, from here on I use groups in place of the objects of category theory, and homomorphisms in place of the morphisms. A reader who knows what groups and homomorphisms are can follow.

The difference between the direct product (left) and the direct sum (right). Image source: my own crude drawing
The figure is already quite clear. The text below spells it out.
The universal property of the direct product is as follows.
For any two group homomorphisms $f_1:B \rightarrow A_1$ and $f_2: B\rightarrow A_2$ , there always exists a group $A_1 \times A_2$ (unique up to isomorphism) and a homomorphism $\varphi:B\rightarrow A_1\times A_2$ such that $f_i= \varphi \circ \pi_i (i=1,2)$ , where $\pi_i$ is the projection map, defined as $\pi_1(a_1,a_2) := a_1,\pi_2(a_1,a_2):=a_2$ .
The direct product of $A_1$ and $A_2$ is the group $A_1 \times A_2$ together with the projection maps $\pi_{1,2}$ .
Note that $\times$ here denotes the direct product, not the Cartesian product. The symbol $\times$ can mean either one, and the meaning has to be determined from the context.
The universal property of the direct sum is as follows.
For any two group homomorphisms $g_1: A_1 \rightarrow B$ and $g_2: A_2 \rightarrow B$ , there always exists a group $A_1 \oplus A_2$ (unique up to isomorphism) and a homomorphism $\phi:A_1 \oplus A_2 \rightarrow B$ such that $g_i=\iota_i \circ \phi (i=1,2)$ . Here $\iota_i$ is the inclusion map, defined as $\iota_1(a):=(a,e_{A_2}),\iota_2(a):=(e_{A_1},a)$ , where $e_{A_i}$ is the identity element of the group $A_i$ .
The direct sum of $A_1$ and $A_2$ is the group $A_1 \oplus A_2$ together with the inclusion maps $\iota_{1,2}$ .
We can see that the homomorphisms of the direct product and the direct sum point in opposite directions. This is where the co- in coproduct comes from, similar to vector and covector.
How the Direct Product and the Direct Sum Differ
The direct product and the direct sum have different universal properties. What are the consequences?
First, the direct product and the direct sum of finitely many objects are exactly the same, and mixing the two causes no problem. For example, $V \times W$ is isomorphic to $V\oplus W$ .
Second, the direct product $\times_{i=1}^{\infty} A_i$ and the direct sum $\bigoplus_{i=1}^{\infty} A_i$ of infinitely many objects are different. The latter allows only finitely many components that are not the identity. The reason is that a group operation is finitary by definition (performing infinitely many group operations usually needs extra notions such as limits), while the definition of the direct sum would involve infinitely many group operations.
Specifically, suppose $\bigoplus_{i=1}^{\infty} A_i$ contained an element $a=(a_1,a_2,\cdots)$ with infinitely many components that are not the identity. Its image under the homomorphism $\phi$ would be something that involves infinitely many group operations, $\varphi(a)=g_1(a_1) \cdot g_2(a_2)\cdot \cdots$ . This is ill-defined, so no such homomorphism $\phi$ would exist. The direct sum therefore cannot contain elements with infinitely many non-identity components.
An Example Where the Direct Product and the Direct Sum Differ
Here is an example where the direct sum differs from the direct product. Consider the direct sum of infinitely many copies of $Z_2$ :
$\bigoplus _{i=1}^{\infty} Z_2 $
where $Z_2 = \{0,1\}$ is the cyclic group of order 2.
It contains only elements with finitely many nonzero components, such as $(1,0,1,0,0,\cdots)$ .
The direct product of infinitely many copies of $Z_2$ is
$\times_{i=1}^{\infty} Z_2$
It allows infinitely many nonzero components, such as $(1,0,1,1,1,\cdots)$ .
The former has the same cardinality as the set of natural numbers, because its elements are the binary representations of the natural numbers.
The latter has the same cardinality as the set of real numbers, because its elements are the binary representations of the interval $[0,1]$ .
So the former is countable and the latter is uncountable. The direct sum of infinitely many copies of $Z_2$ is therefore different from their direct product.
Tensor Product
The definitions of the direct product and the direct sum involve only groups, while the definition of the tensor product usually involves vector spaces (or modules over a ring).

The universal property of the tensor product is as follows.
For any multilinear map $f:V\times W \rightarrow U$ , there exists a vector space $V\otimes W$ (unique up to isomorphism), together with a map $\otimes:V\times W \rightarrow V \otimes W$ and a linear map $\psi: V \otimes W \rightarrow U$ , such that $f = \otimes \circ \psi$ . This vector space $V\otimes W$ is defined as the tensor product of $V$ and $W$ . Here the symbol $\times$ denotes the Cartesian product.
Note. A multilinear map is a map of several vector variables that is linear in each variable. Specifically, an $n$-linear map is defined as $f:V_1\times V_2\times \cdots\times V_n \rightarrow W$ and satisfies the following property:
$$\begin{aligned} &f(v_1,\cdots,\lambda a+ \mu b,\cdots,v_n) \\\\ &=\lambda f(v_1,\cdots,a,\cdots,v_n)+\mu f(v_1,\cdots,b,\cdots,v_n) \end{aligned}$$
Note that in the definition above the symbol $\otimes$ has two different meanings. The first is the tensor product $V \otimes W$ of vector spaces. The second is the tensor product operation on elements of the two vector spaces, that is, the map from $V\times W$ to $V \otimes W$ .
How does the tensor product differ from the direct product? Here is an example. Suppose a 3-dimensional vector space $V$ has three basis vectors $\{v_1,v_2,v_3\}$ and a 2-dimensional vector space $W$ has two basis vectors $\{w_1,w_2\}$ . Their direct product $V\times W$ then has five basis vectors: $\{(v_1,0),(v_2,0),(v_3,0),(0,w_1),(0,w_2)\}$. The tensor product $V \otimes W$ of $V$ and $W$ has six basis vectors: $\{v_1\otimes w_1, v_1 \otimes w_2, v_2 \otimes w_1, v_2 \otimes w_2, v_3 \otimes w_1, v_3 \otimes w_2\}$ .
We can see that the dimension of the direct product is m + n, while the dimension of the tensor product is m × n.
In Chinese textbooks and on the Chinese internet (a comment pointed out that this includes English ones too), many people say “direct product” when they mean the tensor product. This is wrong, but the habit is too deep-rooted to change. When a physicist says “direct product” to you, you have to judge from the context whether it is really the direct product or the tensor product.
Of course, we physicists who work on quantum information never mix them up (proudly), because we use the tensor product every day. The Hilbert space of a composite system is the tensor product of the Hilbert spaces of its subsystems. This is in fact one of the axioms of quantum mechanics. Quantum entanglement appears precisely because it is a tensor product and not a direct product. With a direct product there would be no quantum entanglement.
TL;DR
If you scrolled faster and faster and ended up here, you do not want to read the pile of words above. OK, here is a short summary.
The Cartesian product, the direct product, and the direct sum are basically the same thing. The differences are:
- The Cartesian product is an operation on sets. The direct product and the direct sum are operations on groups (or other objects in category theory), and they also define the corresponding group homomorphisms (morphisms in category theory).
- The direct product and the direct sum do not differ when taken finitely many times. The difference is that an infinite direct product may contain elements with infinitely many non-identity components, while an infinite direct sum may contain only elements with finitely many non-identity components.
The tensor product is very different from the three above. It is usually defined for vector spaces (or modules over a ring). Intuitively, the direct sum / direct product of an m-dimensional vector space and an n-dimensional vector space has dimension m + n, while the tensor product has dimension m × n.