The equation of a hyperbola opening horizontally is given by \[\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1.\] Here, \(a\) represents the distance from the centre to either vertex (half of the length of the transverse axis) and \(b\) represets half the length of the conjugate axis. In this case, the transverse axis is horizontal since the sign of \(x^2\) is positive.
A hyperbola opening vertically is given by \[\dfrac{y^2}{a^2} + \dfrac{x^2}{b^2} = 1.\] Since the sign of \(y^2\) is positive, the transverse axis is vertical.
When plotting a hyperbola, it is often help to draw a rectangle centred at the centre of the hyperbola. Once you determined the transverse axis, you can draw the rectangle based on the values of \(a\) and \(b\). You can then draw the two asymptotes using the corners of the rectangle. The vertices of the hyperbola are at the endpoints of the transverse axis.
The distance from the centre to either focus is \(c\), which satisfies the relation \(b^2 = a^2 - c^2\). The foci and the vertices lie on the same line.
The following diagram shows how the box, the asymptotes and the hyperbola are related. You may adjust the values of \(a\) and \(b\) to see how the hyperbola changes.