My textbook says that the slopes of asymptotes to a hyperbola are given by $m = \pm b/a$ (for a horizontal hyperbola). But I have definitely got things confused because I know that for a rectangular hyperbola the asymptotes are supposed to be perpendicular.
Can you clear my confusion?
The asymptotes of a hyperbola pass through the corners of a rectangle whose sides are its transverse and conjugate axes. In particular, for a hyperbola with equation $$\frac{x^2}{a^2}-\frac{y^2}{b^2}=1 \tag{1}$$ the asymptotes pass through the points $(\pm a, \pm b)$, so their slopes are $$m = \pm\frac{b}{a} \tag{2}$$
A rectangular hyperbola is one in which the transverse and conjugate axes match: $a=b$. Correspondingly, by $(2)$ the asymptotes have slopes $$m = \pm \frac{a}{a} = \pm 1 \tag{3}$$ Lines with slopes $+1$ and $-1$ are are perpendicular (after all, $(+1)\cdot(-1)=-1$), so formula $(2)$ is consistent with the fact that rectangular hyperbolas have perpendicular asymptotes.