$d$ :$X×X$ $\to$ $\mathbb R$ is a metric space iff it satisfies the four conditions -
$d(x,y)$ $\ge$ $0$
$d(x,y)=0$ iff $x=y$
$d(x,y)$=$d(y,x)$ for all $x,y \in$ $X$
$d(x,y)$ $\le$ $d(x,z)$ +$d(z,y)$ for all $x,y,z$ $\in$ $X$
These are the very familiar axioms of a metric space. But from axiom $4$ we can deduce the axiom $3$ but still why in many books, statement $3$ is used as an axiom(although it is not an axiom) ?
Please suggest some edit.
I think this requires some sort of meta-answer since it is true that at least one of the axioms is redundant, but so the question becomes why they include the axiom in textbooks on metric spaces.
The reason is that when coming up with definitions for certain mathematical objects, the minimality of the axioms in the definition (measured in how many properties the mathematical object has to satisfy) is not that important. Especially considering that it is a textbook, there are pedagogical reasons to explicitly write out axioms 1-4).
So in the metric space case, just writing out the axiom 3) or 1), whichever is redundant, just lets the reader focus on those properties, which are semantically a bit different, even though they can be derived from the other axioms.