Problems with the definition of an adjunction space Recently I've been looking at the definition of an adjunction space, and for the most part it makes sense, but there's one part I don't quite understand.

let $X$ and $Y$ be topological spaces with $A$ a subspace of $Y$. Let $f : A → X$ be a continuous map (called the attaching map). One forms the adjunction space $X \cup_f Y$ by taking the disjoint union of $X$ and $Y$ and identifying $x$ with $f(x)$ for all $x$ in $A$. Schematically, $$X\cup_fY=(X\sqcup Y)/\sim$$

(Definition copied from Wikipedia)
What I'm having trouble with is the identification $\sim$ being given, it doesn't seem to meet any of the criteria for being an equivalence relation.
Here's how I've seen $\sim$ usually defined, $$p_1\sim p_2 \iff p_2\in A \; and \;f(p_2)=p_1$$
(I got this definition here)
Now I think it's pretty clear from this definition that it isn't symmetric and while for some functions it could be reflexive, it generally isn't. To top it off, transitivity in terms of this relation makes no sense, $f$ is mapping from $A\subset Y$ into $X$, meaning $p_2$ automatically would not be a viable input for the left hand side because it's not even in $A$. In summary, it doesn't meet any of the criteria to be an equivalence relation.
I feel like I'm missing something here, like this is shorthand for something else but I can't really think of what. Or maybe I've just overthought the whole thing, either way, if someone could help break the definition down and actually explain how adjunctions work I would be immensely grateful.
 A: Indeed, the relation you've stated is not an equivalence relation.  Describing the actual equivalence relation would be a bit tedious, so let's just describe the equivalence classes.
If $x\in X\setminus A$, then $[x]=\{x\}$.  
If $a\in A$, then $[a]=f^{-1}(\{f(a)\})\cup\{f(a)\}$.
If $y\in Y\setminus f(A)$, then $[y]=\{y\}$.
If $y\in f(A)$, then $y=f(a)$ for some $a\in A$, and $[y]=[a]$.
Use this, and the picture in the pdf you linked, to help build your intuition.
A: The definition $$p_1\sim p_2 \iff p_2\in A \; and \;f(p_2)=p_1$$ is indeed simply wrong, and it is very sloppy of those notes to write the definition that way.  The correct definition is that if $\sim$ is the relation defined in this way, you want the equivalence relation generated by $\sim$.  That is, you want the smallest equivalence relation on $X\sqcup Y$ that contains all $(p_1,p_2)$ such that $p_2\in A$ and $f(p_2)=p_1$.  So in addition to all such pairs, you also have all the other pairs you are forced to have in order to satisfy reflexivity, symmetry, and transitivity.
In this particular case, the generated equivalence relation can be described pretty explicitly as in Aweygan's answer.  In general, if $R$ is a relation, then the equivalence relation generated by $R$ consists of all pairs $(x,y)$ such that for some $n\in\mathbb{N}$ there exist $p_0,p_1,\dots,p_n$ with $p_0=x$, $p_n=y$, and either $(p_i,p_{i+1})\in R$ or $(p_{i+1},p_i)\in R$ for all $i$ such that $0\leq i<n$.  (This includes the case $n=0$, where $x=p_0=y$.)  In other words, $x$ and $y$ are equivalent if they can be connected by a "chain" of pairs related by $R$ (in either direction, in order to satisfy symmetry).
