Algorithm
Suppose that we want to find the value of the unknown function f at the point P = (x, y). It is assumed that we know the value of f at the four points Q11 = (x1, y1), Q12 = (x1, y2), Q21 = (x2, y1), and Q22 = (x2, y2).
We first do linear interpolation in the x-direction. This yields
where ,
where
We proceed by interpolating in the y-direction.
This gives us the desired estimate of f(x, y).
Read more about this topic: Bilinear Interpolation