What does “same” mean? What is Isomorphism?

Ujjawal Sinha
3 min readMar 1, 2022

--

In the previous blog, I gave a short introduction to Category Theory. There I said that “AxB” and “BxA” are “same” (for all intended purposes). In this blog, I will try to explain that more precisely, in particular, I will define what an isomorphism is?

What is isomorphism?

In a Category C, We say that a morphism f: x -> y ∈ C(x, y) is isomorphic, if there exists a morphism g ∈ C(y, x) such that-

g . f = idₓ
and, f . g = idᵧ

Note that identity morphisms (idₓ and idᵧ) always exist, I don’t draw them for simplicity. The same is true for the composition of morphisms.

In the above example, we say that x & y are isomorphic to each other, and are the “same” for all intended purposes.

Why are AxB and BxA isomorphic?

Because one can define a swap function that interchange the pairs (a, b)

# In Haskell
swap :: (a, b) -> (b, a)
swap (a, b) = (b, a)
# In Python
def swap(a, b):
return (b, a)

swap is isomorphic because there exists a function swap such that swap . swap = id . (swap is isomorphic to itself, i.e; swapping twice is the same as no action). For all intended purposes (2, 3) is “same” as (3, 2).

Any kind of action that is invertible in both directions (i.e g . f = idₓ and f . g = idᵧ) forms an isomorphic pair of objects x & y.

In a world where the state of an object is its position only, moving from point A to B, and back to A is the “same” as not moving at all. We say that the action: “moving from point A to B” is an isomorphism because there exists an action: “moving from point B to A” such that composing these together is the same as not moving at all.

There is an isomorphism between a Set of Natural numbers ℕ and a Set of whole numbers W, with (+1) and (-1) as morphism pairs, such that-

We can’t say +1 is an isomorphism between ℕ and ℕ because there we cannot define any invertible function such that going back from ℕ to ℕ is the same as id. (because if we tried to define a function -1 from ℕ to ℕ, then that function will be incomplete, we will not be able to map 0 to any value in ℕ, such that it creates isomorphism) (Ponder a bit on this)

Not all invertible functions are isomorphic, it has to be invertible from other side as well.

We can say that there is an isomorphism between ℕ and a set of even ℕ, with (* 2) and (/ 2) as morphism pairs. ℕ = {0, 1, 2, 3, …}, set of even ℕ = {0, 2, 4, 6, 8, …}, it can be clearly seen that multiplying every element by 2 of ℕ gives you set of even ℕ, and dividing 2 to every element of even ℕ gives you ℕ

Renaming columns of a table is an isomorphic action, deleting after inserting a row in a table is an isomorphic action, going north, then south is an isomorphic action, etc.

There are several other examples of isomorphism in the real world, and the notion of isomorphism is a formal description of what “same” means.

(Next “”Injective and Surjective" functions are isomorphism”)

--

--