AMS GSM 104
Errata available online: 
"This text presents an introduction to algebra suitable for upper-level undergraduate or beginning graduate courses. While there is a very extensive oﬀering of textbooks at this level, in my experience teaching this material I have invariably felt the need for a self-contained text that would start ‘from zero’ (in the sense of not assuming that the reader has had substantial previous exposure to the subject), but impart from the very beginning a rather modern, categorically-minded viewpoint, and aim at reaching a good level of depth. Many textbooks in algebra satisfy brilliantly some, but not all of these requirements. This book is my attempt at providing a working alternative."
Chapter I : Preliminaries: Set theory and categories Edit
Chapter II : Groups, ﬁrst encounterEdit
Chapter III : Rings and modulesEdit
Chapter IV : Groups, second encounterEdit
Chapter V : Irreducibility and factorization in integral domainsEdit
Chapter VI : Linear algebraEdit
Chapter VII : FieldsEdit
Chapter VIII : Linear algebra, repriseEdit
Chapter IX : Homological algebraEdit
Section IX.1 (Un)necessary categorical preliminaries Edit
- After Example 1.11: The coproduct $ A \sqcup B $ is endowed with morphisms $ i_A: A \to A \sqcup B $, $ i_B: B \to A \sqcup B $ which are easily checked to be monomorphisms (do this!): We have $ \pi_A \circ i_A = 1_A $ by definition, or in other words $ \pi_A $ is a left-inverse of $ i_A $. Since monomorphisms are defined by cancellation, this is actually even a bit stronger than being a monomorphism (roughly the equivalent of "unit implies non-zerodivisor" in a commutative ring.)
- Proposition 1.12, $ \pi_B $ is the cokernel of $ i_A $: The proof given here is bizarrely stated. I had to work things out on my own, after which I eventually realized that my method matched the books. Don't, as suggested, stare at the diagram; the diagram is weird and unhelpful. Here's what it says: We already know that $ \pi_B \circ i_A = 0 $, so what remains to show is that for any object C and any map $ \gamma : A \sqcup B \to C $ with $ \gamma \circ i_A = 0 $, there exists a unique map $ \delta : B \to C $ such that $ \delta \circ \pi_B = \gamma $. In particular, we claim that $ \delta = \gamma \circ i_B $. To see this, consider the (unique!) map $ g : = (0 \sqcup (\gamma \circ i_B)) : A \sqcup B \to C $; that is, the unique map such that $ g \circ i_A = 0 $ and $ g \circ i_B = \gamma \circ i_B $. By definition, $ \gamma $ satisfies both equations, so $ g = \gamma $. On the other hand, we can also check that $ (\gamma \circ i_B \circ \pi_B) $ satisfies both equations, so $ g = \gamma \circ i_B \circ \pi_B $. Therefore $ \gamma = \gamma \circ i_B \circ \pi_B = \delta \circ \pi_B $, which is what we wanted to show.
- Exercise 1.14: The word 'sheaf' should be replaced by 'presheaf' here.