Well you never specified what you're asking... however, this might help you learn the concepts of displacements and magnitude.
: The official displacement formula is as follows: s = sf - si. s = displacement; si = initial position; sf = final position
magnitude is the quantitative value of seismic energy. It is a specific value having no relation with distance and direction of the epicentre.
the magnitude of a vector in any dimension. For a 2d vector the formula is [math]|z| = \sqrt{x^2+y^2}[/math], where x and y are the x and y components of the vector respectively.