While proving that $\pi_1(X,x_0)$ is a group of all homotopic classes $[f]$ of loops $f:[0,1] \longrightarrow X$ based at $x_0 \in X$ w.r.t. the composition $(*)$ defined by $[f]*[g]=[f*g]$ I have understood the facts that $(*)$ is well-defined, that $(*)$ is associative on $\pi_1(X,x_0)$ and also that $[e_{x_0}]$ is the two sided identity in $\pi_1(X,x_0)$ where $e_{x_0}$ is the constant loop in $X$ based at $x_0 \in X$. But I find difficulty to understand the fact that each homotopic class in $\pi_1(X,x_0)$ has inverse in it under $(*)$ from the discussion made by Allen Hatcher in his book "Algebraic Topology". The things are not well represented there. How can I show that the inverse of the homotopic class $[f]$ is $[f']$ in $\pi_1(X,x_0)$ under the composition $(*)$ where $f'$ is the inverse path of $f$ in $X$?
Would anybody help me in understanding the remaining fact to be proved for showing that $\pi_1(X,x_0)$ indeed forms a group w.r.t. the composition $(*)$ defined on it? Then it will help me a lot.
Thank you in advance.

Let $I=[0,1]$. Let $i:I \longrightarrow I$ be the identity map on $I$. Let $\bar i$ be the inverse of $i$ on $I$. Then $i*\bar i$ is a path in $I$ based at $0$. Also the constant path at $0$ i.e. $e_0$ is the constant map on $I$ based at $0$. Since $I$ is convex $i*\bar i$ is always homotopic to $e_0$ by means of the linear homotopy say $F$. Since $f:I \longrightarrow X$ is continuous on $I$ so it is very easy to see that $f \circ F$ is a path homotopy between $f \circ e_0 =e_{x_0}$ and $f \circ (i * \bar i) = (f \circ i) * (f \circ \bar i)= f * f'$. That means $f* f' \simeq e_{x_0}$ in $X$. Similarly $\bar i * i$ is homotopic to $e_0$ in $I$ by the convexness of $I$ by means of linear homotopy say $G$. Then by the previous argument we have $f \circ G$ is a path homotopy between $e_{x_0}$ and $ f' * f$ i.e. $ f' * f \simeq e_{x_0}$ in $X$. This shows that $[f]*[f'] = [f']*[f]=[e_{x_0}]$. This shows that $[f']$ is the inverse of $[f]$ in $\pi_1(X,x_0)$ under the composition $(*)$ defined on $\pi_1(X,x_0)$.