{"id":1550,"date":"2011-10-09T20:30:01","date_gmt":"2011-10-10T00:30:01","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/?p=1550"},"modified":"2011-10-09T20:30:01","modified_gmt":"2011-10-10T00:30:01","slug":"category-intuition-by-example","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2011\/10\/09\/category-intuition-by-example\/","title":{"rendered":"Category Intuition by Example"},"content":{"rendered":"<p> The good thing about category theory is that it abstracts everything down to a couple of very simple, bare-bones concepts, and lets us play with those concepts in really fascinating ways. But the bad thing about category theory is that it abstracts everything down so much that it can be difficult to have any intuitive sense about what things actually mean.<\/p>\n<p> We said that a category is, basically, a collection of objects connected by arrows, and a composition operation over the arrows. But what the heck is an object, and what is an arrow?<\/p>\n<p> In some sense, the point of category theory is that <em>it doesn&#8217;t matter<\/em>. There&#8217;s a set of fundamental concepts that underly all composable mapping-like things, and category theory focuses in on those fundamental concepts, and what they mean.<\/p>\n<p> But still, to understand category theory, you need to be able to get some kind of intuitive handle on what&#8217;s going on. And so, we&#8217;ll take a look at a few examples.<\/p>\n<h2>The Category <b>Set<\/b><\/h2>\n<p> One of the easiest examples is the category <b>Set<\/b>. The objects of the category are, obviously, sets; the morphisms are functions between sets; and composition is (obviously) function composition.<\/p>\n<p> That much is easy. Now, what about the special arrows? What do all of the epi, iso, endo, and auto arrows in the category of sets?<\/p>\n<p> An monomorphism over the category of sets is an injective function &#8211; that is, a function which maps each value in the domain to a distinct value in the range. So you can always reverse the function: given a value in the range of the function, you can always say, specifically, exactly what value in the domain maps to it. In a monomorphism in the category set, there may be values in the target of the morphism that aren&#8217;t mapped to by any element of the range; but <em>if<\/em> a value of the range is mapped to, you know which value in the domain mapped to it.<\/p>\n<p> The key property of the monomorphism is that it&#8217;s <em>left-cancellative<\/em> &#8211; that is, if <img src='http:\/\/l.wordpress.com\/latex.php?latex=f&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f' style='vertical-align:1%' class='tex' alt='f' \/> is a monomorphism, then we know that <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%20circ%20g%20%3D%3D%20f%20circ%20h&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f circ g == f circ h' style='vertical-align:1%' class='tex' alt='f circ g == f circ h' \/> is only true if <img src='http:\/\/l.wordpress.com\/latex.php?latex=g%20%3D%20h&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='g = h' style='vertical-align:1%' class='tex' alt='g = h' \/>. We can <em>cancel<\/em> the left side of the composion. Why? Because we know that <img src='http:\/\/l.wordpress.com\/latex.php?latex=f&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f' style='vertical-align:1%' class='tex' alt='f' \/> maps each value in its domain to a <em>unique<\/em> value in its range. So <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%20circ%20g&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f circ g' style='vertical-align:1%' class='tex' alt='f circ g' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%20circ%20h&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f circ h' style='vertical-align:1%' class='tex' alt='f circ h' \/> can only be the same if they map all of the same values in their domain to the same values in their range &#8211; that is, if they&#8217;re the same function.<\/p>\n<p> An epimorphism is an onto function &#8211; that is, a mapping <img src='http:\/\/l.wordpress.com\/latex.php?latex=f&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f' style='vertical-align:1%' class='tex' alt='f' \/> from a set <img src='http:\/\/l.wordpress.com\/latex.php?latex=X&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='X' style='vertical-align:1%' class='tex' alt='X' \/> to a set <img src='http:\/\/l.wordpress.com\/latex.php?latex=Y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='Y' style='vertical-align:1%' class='tex' alt='Y' \/> in which for every value <img src='http:\/\/l.wordpress.com\/latex.php?latex=y%20in%20Y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='y in Y' style='vertical-align:1%' class='tex' alt='y in Y' \/>, there&#8217;s some value in <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%20in%20X&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x in X' style='vertical-align:1%' class='tex' alt='x in X' \/> such that <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28x%29%3Dy&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(x)=y' style='vertical-align:1%' class='tex' alt='f(x)=y' \/>. It&#8217;s a dual of the notion of a monomorphism; for each value in the range, there is at least one value in the domain that maps to it. But it&#8217;s not necessary that the domain values be unique &#8211; there can be multiple values in the domain that map onto a particular value in the range, but for every element of the domain, there&#8217;s always <em>at least<\/em> one value that maps to it. It&#8217;s <em>right-cancellative<\/em> in the same way that the monomorphism is left-cancellative.<\/p>\n<p> What about iso-morphism? If you combine the ideas of mono-morphism and epi-morphism, what you end up with is a function where every member of the domain is mapped onto a unique value in the range, and every value in the range is mapped onto by at least one value: it&#8217;s a one-to-one function. <\/p>\n<h2>The Category <b>Poset<\/b><\/h2>\n<p> <b>Poset<\/b> is the category of <em>partially ordered sets<\/em>. A partially ordered set is a set with a binary relation, <img src='http:\/\/l.wordpress.com\/latex.php?latex=le&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='le' style='vertical-align:1%' class='tex' alt='le' \/>, which satisfies the following properties:<\/p>\n<ol>\n<li> Reflexivity: <img src='http:\/\/l.wordpress.com\/latex.php?latex=forall%20a%3A%20a%20le%20a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='forall a: a le a' style='vertical-align:1%' class='tex' alt='forall a: a le a' \/><\/li>\n<li> Antisymmetry: if <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20le%20b%20land%20b%20le%20a&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a le b land b le a' style='vertical-align:1%' class='tex' alt='a le b land b le a' \/> then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20%3D%20b&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a = b' style='vertical-align:1%' class='tex' alt='a = b' \/>.<\/li>\n<li> Transitivity: if <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20le%20b%20land%20b%20le%20c&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a le b land b le c' style='vertical-align:1%' class='tex' alt='a le b land b le c' \/> then <img src='http:\/\/l.wordpress.com\/latex.php?latex=a%20le%20c&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='a le c' style='vertical-align:1%' class='tex' alt='a le c' \/><\/li>\n<\/ol>\n<p> In the category of partially ordered sets, the arrows are <em>monotonic<\/em> functions &#8211; that is, functions that preserve the partial ordering. So if <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%20le%20y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x le y' style='vertical-align:1%' class='tex' alt='x le y' \/>, then if <img src='http:\/\/l.wordpress.com\/latex.php?latex=f&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f' style='vertical-align:1%' class='tex' alt='f' \/> is monotonic, <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28x%29%20le%20f%28y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(x) le f(y)' style='vertical-align:1%' class='tex' alt='f(x) le f(y)' \/>.<\/p>\n<p> The arrow composition operation, <img src='http:\/\/l.wordpress.com\/latex.php?latex=circ&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='circ' style='vertical-align:1%' class='tex' alt='circ' \/>, is still just function composition. In terms of meaning, it&#8217;s pretty much the same as it was for simple sets: a monomorphism is still a surjective function; etc. But in <b>Poset<\/b> it needs to be a surjective function that preserves the ordering relation.<\/p>\n<p> We know that monotonic functions fit the associative and identity properties of category arrows &#8211; they&#8217;re still just functions, and monotonicity has no effect on those. But for posets, the composition is a bit tricky &#8211; we need to ensure that composition maintains the partial order. Fortunately, that&#8217;s easy. <\/p>\n<ul>\n<li> Suppose we have arrows <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%20%3A%20A%20rightarrow%20B&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f : A rightarrow B' style='vertical-align:1%' class='tex' alt='f : A rightarrow B' \/>, <img src='http:\/\/l.wordpress.com\/latex.php?latex=g%20%3A%20B%20rightarrow%20C&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='g : B rightarrow C' style='vertical-align:1%' class='tex' alt='g : B rightarrow C' \/>. We know that <img src='http:\/\/l.wordpress.com\/latex.php?latex=f&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f' style='vertical-align:1%' class='tex' alt='f' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=g&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='g' style='vertical-align:1%' class='tex' alt='g' \/> are monotonic functions.<\/li>\n<li> So for any pair of <img src='http:\/\/l.wordpress.com\/latex.php?latex=x&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x' style='vertical-align:1%' class='tex' alt='x' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='y' style='vertical-align:1%' class='tex' alt='y' \/> in the domain of <img src='http:\/\/l.wordpress.com\/latex.php?latex=f&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f' style='vertical-align:1%' class='tex' alt='f' \/>, we know that if <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%20le%20y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x le y' style='vertical-align:1%' class='tex' alt='x le y' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28x%29%20le%20f%28y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(x) le f(y)' style='vertical-align:1%' class='tex' alt='f(x) le f(y)' \/>. <\/li>\n<li> Likewise, for any pair <img src='http:\/\/l.wordpress.com\/latex.php?latex=s%2Ct&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='s,t' style='vertical-align:1%' class='tex' alt='s,t' \/> in the domain of <img src='http:\/\/l.wordpress.com\/latex.php?latex=g&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='g' style='vertical-align:1%' class='tex' alt='g' \/>, we know that if <img src='http:\/\/l.wordpress.com\/latex.php?latex=s%20le%20t&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='s le t' style='vertical-align:1%' class='tex' alt='s le t' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=g%28s%29%20le%20g%28t%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='g(s) le g(t)' style='vertical-align:1%' class='tex' alt='g(s) le g(t)' \/>.<\/li>\n<li> So we just put those together: if <img src='http:\/\/l.wordpress.com\/latex.php?latex=x%20le%20y&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='x le y' style='vertical-align:1%' class='tex' alt='x le y' \/>, then <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28x%29%20le%20f%28y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(x) le f(y)' style='vertical-align:1%' class='tex' alt='f(x) le f(y)' \/>. <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28x%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(x)' style='vertical-align:1%' class='tex' alt='f(x)' \/> and <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(y)' style='vertical-align:1%' class='tex' alt='f(y)' \/> are in the domain of <img src='http:\/\/l.wordpress.com\/latex.php?latex=g&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='g' style='vertical-align:1%' class='tex' alt='g' \/>, so if <img src='http:\/\/l.wordpress.com\/latex.php?latex=f%28x%29%20le%20f%28y%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='f(x) le f(y)' style='vertical-align:1%' class='tex' alt='f(x) le f(y)' \/> then we know <img src='http:\/\/l.wordpress.com\/latex.php?latex=g%28f%28x%29%29%20le%20g%28f%28y%29%29&#038;bg=FFFFFF&#038;fg=000000&#038;s=0' title='g(f(x)) le g(f(y))' style='vertical-align:1%' class='tex' alt='g(f(x)) le g(f(y))' \/><\/li>\n<\/ul>\n<h2>The category <b>Grp<\/b><\/h2>\n<p> Our last example is the category of <em>groups<\/em>, which is called <b>Grp<\/b>. In this category, the objects are (obviously) groups. What are arrows? Group homomorphisms &#8211; that is, essentially, functions between sets that preserve the group structure.<\/p>\n<p> What&#8217;s a homomorphism in this category? That&#8217;s a bit confusing, because we get stuck with some overloaded terminology. But it&#8217;s basically just a symmetry-preserving surjection &#8211; that is, it&#8217;s a reversable mapping from a group into a second group, where the group symmetry of the first group is mapped onto the group symmetry of the second by the arrow.  You should be able to follow the meanings of the other kinds of morphisms by using similar reasoning.<\/p>\n<p> These are all, of course, very simple examples. They&#8217;re all <em>concrete<\/em> categories, where the objects are (speaking very loosely) sets. There are categories &#8211; many very interesting ones &#8211; where the objects aren&#8217;t sets or even particularly set-like &#8211; but we&#8217;ll get to those later. For now, the ideas of objects as sets gives you an intuitive handle to grab onto.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The good thing about category theory is that it abstracts everything down to a couple of very simple, bare-bones concepts, and lets us play with those concepts in really fascinating ways. But the bad thing about category theory is that it abstracts everything down so much that it can be difficult to have any intuitive [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[76],"tags":[],"class_list":["post-1550","post","type-post","status-publish","format-standard","hentry","category-category-theory"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-p0","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/1550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=1550"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/1550\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=1550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=1550"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=1550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}