In inverse variation, the relationship between \( x \) and \( y \) can be expressed as:
\[ y = \frac{k}{x} \]
where \( k \) is a constant.
Given that \( y = 24 \) when \( x = 2 \), we can find \( k \):
\[ 24 = \frac{k}{2} \]
Multiplying both sides by 2, we get:
\[ k = 24 \times 2 = 48 \]
Now that we have \( k \), we can find \( y \) when \( x = -4 \):
\[ y = \frac{k}{x} = \frac{48}{-4} \]
Calculating this gives:
\[ y = -12 \]
Therefore, when \( x = -4 \), \( y = -12 \).