The general equation of a hyperbola with horizontal transverse axis is:
\[
\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1
\]
where \(2c\) is the distance between the foci, and \(e\) is the eccentricity. We know the relationship:
\[
e = \frac{c}{a}
\]
Also, for a hyperbola, \( c^2 = a^2 + b^2 \).
Step 1: Use given data
From the problem, we are given that the distance between the foci is 16, so \(2c = 16\), implying that:
\[
c = 8
\]
Also, the eccentricity \( e = \sqrt{2} \), so:
\[
e = \frac{c}{a} \implies \sqrt{2} = \frac{8}{a} \implies a = \frac{8}{\sqrt{2}} = 4\sqrt{2}
\]
Step 2: Calculate \( b^2 \)
Using the relationship \( c^2 = a^2 + b^2 \), we can solve for \( b^2 \):
\[
c^2 = a^2 + b^2 \implies 8^2 = (4\sqrt{2})^2 + b^2 \implies 64 = 32 + b^2
\]
\[
b^2 = 64 - 32 = 32
\]
Step 3: Write the equation
Substitute the values of \( a^2 \) and \( b^2 \) into the standard equation of the hyperbola:
\[
\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1 \implies \frac{x^2}{32} - \frac{y^2}{32} = 1
\]
Multiplying both sides by 32 gives:
\[
x^2 - y^2 = 32
\]
Thus, the equation of the hyperbola is \( x^2 - y^2 = 32 \).