Hooke's law applies to both compression and tension, indicating that the spring constant remains the same regardless of whether a spring is being stretched or compressed. The fundamental equation, F = -kx, holds true in both scenarios. This means that the force exerted by the spring is proportional to the displacement from its equilibrium position in either direction. Therefore, the behavior of springs under compression mirrors that under tension. Understanding this relationship is crucial for applications involving springs in various mechanical systems.