How can we be sure that the equation of SHM that works for one dimension of an object moving in circular motion works for all SHM? I have learned that a component of a uniform circular motion is an example of SHM. And I have no question about it, I  totally understand that. I also understand how we can derive formulas like $\vec{a} = - \omega^2 x$ and more. But my question is how can we use this formulas we derived for this one example of SHM to all other harmonic motions say a block attached to a horizontal spring. Is this because of the definition of SHM? (I mean in that case if all SHM's have the same definitions and you can drive an equation for one I think it is possible to argue it will hold for other too) or is there a mathematical proof that show SHM in a uniform circular motion and SHM in a block attached to a horizontal spring are equivalent?
 A: Simply harmonic motion occurs when the restoring force is proportional to the displacement from equilibrium. Mathematically, you get this whenever you have a differential equation of the form
$$\ddot x=-\omega^2 x$$
where $\omega^2$ is some constant (this is your $a=-\omega^2 x$).
There are many physical systems whose equation of motion has this form: masses on springs, pendulums with small angle oscillations, LC circuits, etc. As long as this equation pops up, you can describe the "motion" as "simple harmonic".
A: In other to answer your question, i will let you know that simple harmonic motion follows a particular definition (which i believe you know). When ever we study systems or we wish to model a system and it conforms to our real definition of simple harmonic motion,  we immediately use the equations that relate.
For a mass spring system,  we observe its motion,  we measure our quantities (such as Accelaration, distance, time etc) we study the numbers and we find that it conforms to what we had define as simple harmonic motion.
For a projection of a particle in circular motion. We study its charateristics and it is so similar to that of a mass spring system hence instead of going into the complications which are offered by circular motion we prefer to go directly to the simplicity of simple harmonic motion.
So the answer to your question is Yes! Everything is based on how we define simple harmonic motion
A: To make it easy, if you consider a spring, the equation of motion is:
\begin{equation}
M a = - k l,
\end{equation}
where M is the mass of the object, l the length of the spring, k the spring constant, and $a$ the acceleration. This is the equation of motion of a spring.
If you take a particle undergoing a uniform circular motion, the projection of its position over one diameter follows the law:
\begin{equation}
a = - \omega^2 l.
\end{equation}
The two equations above are the same, this means that the projection undergoes a simple harmonic motion.
