A single-story building may be thought of as a single mass (the roof) supported by elastic walls, which also have some damping.

Fig.1: A single-story building as a single spring-mass-damper system
When the mass of this structural system moves laterally it has kinetic energy. When the columns flex they have potential energy. Every type of physical oscillation is essentially an exchange of potential energy with kinetic energy. In a single story building, the potential energy is the strain energy stored by the elastic deformation of the structural walls and columns, , and the kinetic energy is the energy of the structure's inertia (floors and roof) in motion,
. For an oscillatory vibration, the motion is sinusoidal,

where is the amplitude of the vibration and
is the frequency of the vibration in radians per second. In un-forced, free vibration, whenever the potential energy is zero
, the kinetic energy is maximal,
; and whenever the kinetic energy is zero
, the potential energy is maximal,
. Setting the maximum kinetic energy equal to the maximum potential energy,
, results in the familiar expression for the natural frequency,
, of the structure
. When an undamped single degree of freedom system is allowed to oscillate freely from some initial displacement or velocity, it will always oscillate at its natural frequency,
. Furthermore, if the ground motion
is sinusoidal with a frequency equal to the building's natural frequency, then the building will resonate and the amplitude of its dynamic response can become extremely large. The role of damping in building vibrations is primarily to limit the amplitude of the vibration during resonance.
For lateral vibrations of a multi-story building, on the other hand, it is convenient to assume that each floor is a rigid mass and that the walls and columns are mass-less and flexible. As will be described below, the stiffness and mass of a multi-story building are described by a stiffness matrix, K, and a mass matrix, M. The potential energy associated with a set of displacements x is and the kinetic energy is
, where x is now a vector of the lateral displacements of each story, as shown in Figure 2b. Again, assuming that

and equating the potential energy amplitude with the kinetic energy amplitude,
(1)
Equation (1) is called the general eigen-value problem. For an N -story building, K and M are N x N , symmetric, positive-definite, matrices. When K is positive definite it means that the building is connected to the ground; it is not free-floating. When M is positive definite it means that every floor of the building has some positive mass. There are two ways for equation (1) or, equivalently, the equation:
(2)
have a solution. The first is if , which is trivial. The second is if the matrix
can not be inverted, i.e., if it's determinant is equal to zero. In general, for an N -story building, there are N values of
for which
equals zero. These are called the natural frequencies,
, of the building. For each natural frequency,
, there is a vector
for which
. These vectors are called eigen-vectors or the mode shapes of the building. The natural frequencies and mode shapes of an N -story building are uniquely determined by the building's mass and stiffness. Neglecting the effects of damping (for now), if a building is allowed to vibrate freely, it will do so in a combination of its N natural frequencies and N mode shapes. That is, any free vibration may be expressed,
(3)
where the phase angles, , depend only upon the displacement and velocity at the beginning of the free vibration response. Furthermore, if the ground motion
is sinusoidal with a frequency equal to any one of the building's natural frequencies, then the building will resonate and if the damping is small, the resonant response can become extremely large.
Another way of expressing the eigen-value problem in equation (1) is by another equation called the Rayleigh quotient.
(4)
This equation is analogous to the equation for the natural frequency of a single-story building Another property of the mode-shapes is that they are both mass orthogonal and stiffness orthogonal. This means that
(5)
where is called the modal mass and
is called the modal stiffness. From these equations, we can see that
, which looks a lot like the equation for a single degree of freedom structure.