# Definition of homotopy equivalence in an arbitrary model category

I'm reading notes on Whitehead's Theorem, and I'm slightly confused on the definition of homotopy equivalence. Let $$f: X\to Y$$ be a morphism in a model category $$(C, Cof, Fib, W)$$. We say that $$f$$ is a homotopy equivalence if there exists a morphism $$g: Y\to X$$ such that $$f\circ g$$ and $$g\circ f$$ are homotopic to the appropriate identity maps.

But, the notes don't define what it means for two maps to be homotopic. They do, however, define left-homotopies and right-homotopies. Are two maps homotopic precisely when they're both left- and right-homotopic? My confusion with this is that I know that maps $$f:X\to Y$$ and $$g:Y\to X$$ that are left-homotopic aren't necessarily right-homotopic, and vice versa, unless $$X$$ and $$Y$$ are fibrant-cofibrant objects. But, not all objects in the standard model structure on Top are cofibrant, and it seems that the standard definition of homotopic maps in Top is precisely the condition that they're right-homotopic. So, I'm unsure what the definition of homotopic maps in an arbitrary model category is.

There is a notion of homotopy for morphisms in any relative category, i.e., a category $$C$$ equipped with a class of weak equivalences $$W$$ closed under compositions.

In a relative category $$(C,W)$$, two morphisms $$f,g\colon X→Y$$ are homotopic if the corresponding vertices in the hom-object $$C_W(X,Y)$$ of the hammock localization $$C_W$$ are in the same connected component, i.e., are connected by a hammock of zigzags as described in the article.

This is the most general (and correct) notion of a homotopy in this context. It places no restrictions on objects (such as cofibrancy) or categories (such as the presence of a compatible model structure on a given relative category).

Now, given a left or right homotopy $$H$$ from $$f$$ to $$g$$ it is easy to construct a hammock $$h$$ consisting of three zigzags that connects $$f$$ to $$g$$.

The less trivial question is when the existence of a homotopy $$h$$ from $$f$$ to $$g$$ implies the existence of a left or right homotopy $$H$$ from $$f$$ to $$g$$, which, moreover, encodes the original homotopy $$h$$ in the following precise sense: converting $$H$$ back into a hammock yields some homotopy $$h'$$ that is itself homotopic to $$h$$.

This is not always true, and the point of (co)fibrancy conditions imposed on left/right homotopies (see, for example, Hovey's book) is ultimately (but somewhat implicitly) to guarantee that this is possible.