Using Newtons second law of motion and the expression for acceleration of a particle undergoing S.H.M., the force acting on a particle of mass M in S.H.M. is:
f(t) = ma
= -mω2 (xt)
i.e., f(t) = -kx (t)
where k = mω2
or \(\omega = \sqrt{\frac{k}{m}}\)
Like acceleration, force is always directed towards mean position.