Geometric interpretation of this bilinear interpolation equation? Bilinear interpolation can be achieved by interpolating two values across the x axis, and then interpolating between the results across the y axis, like in the image below (from https://blog.demofox.org/2015/04/30/bilinear-filtering-bilinear-interpolation/)



A way to write this mathematically is like this:

$x,y,P_{xy} \in \mathbb{R}$

$x,y \in [0,1]$

$z = (P_{00}(1-x) + P_{10}x)(1-y) + (P_{01}(1-x)+P_{11}x)y$

Doing some algebra, you can get it into a polynomial form:

$z = (P_{00}-P_{10}-P_{01}+P_{11})xy + (P_{10}-P_{00})x + (P_{01}-P_{00})y + P_{00}$

I'm trying to find the (geometric?) intuition for this form of bilinear interpolation but the first term doesn't make much sense to me.

The second term makes some sense because it's saying "add in the difference across the x axis, multiplied by how far you are down the x axis".  The third term is the same, but for the y axis.

The last term is just adding the value at the "starting coordinate" that everything else adds to, so that makes sense as well.

I can't figure out how that first term fits in though, or what exactly it's calculating.  it is the only term that deals with the $P_{11}$ so it is obviously doesn't something meaningful, but I can't quite figure out what it is.

Can anyone explain bilinear interpolation from this point of view?

Note: $P_{00}$ is (0,0), $P_{01}$ is (0,1), $P_{10}$ is (1,0) and $P_{11}$ is (1,1).
If we look at the two terms with only x or only y they fully describe what happens when you go right or up from the starting point.

The xy-terms does not come into play at all.

When you want to go "into the square" or along the upper or the right edge then the xy-term comes into play. It cancels out the x/y-terms and introduce the P11-value that it should obtain in upper-right.

No full explanation here, just nudging along towards insight!