How to center align math with text in latex?

image
How do I make the content below a \text{} line centered?

I want to make the equations below the instruction centered.

$$\begin{array}  
\text{Rearrange\ each \ equation\ by\ making\ the\ marked\ variable\ the\ subject}\\

f=\frac{1}{2\Pi}\sqrt{ \frac{k}{m} } \\  
v=\sqrt{ \frac{YRT}{m} }  

\end{array}
$$

Is there a different way to write it without the \ between the words? I wanna include a bunch of steps for different equations and feel like it will slow my process down a lot.

1 Like
$$
\begin{gather*}
\text{Rearrange each equation by making the marked variable the subject} \\
f=\frac{1}{2\Pi}\sqrt{ \frac{k}{m} } \\
v=\sqrt{ \frac{YRT}{m} }
\end{gather*}

$$