2. Given the equations of the two asymptotes of a hyperbola are $x+y=0$ and $x-y=0$, and the distance between the two vertices is 2, find the equation of this hyperbola.
According to the problem, $2 a=2 \Rightarrow a=1$. When the foci of the hyperbola are on the $x$-axis, the equation of the hyperbola is $x^{2}-y^{2}=1$; when the foci of the hyperbola are on the $y$-axis, the equation of the hyperbola is $y^{2}-x^{2}=1$.