What do you mean what is the math behind the zoom...
Maybe I'm making this harder than it is, so I'll just put my thoughts out.
Lets say you are graphing y=x.
You first setup your coordinates.
Lets say:
x= -10..10
y= -10..10
Now setup a scale,
x_scl = 1
y_scl = 1
Now have the program draw the axis.
Now have the program plot within this window. You are using discrete values here, so you have a restricted domain. You will feed the function values from -10 to 10, such as r_n1 = -10, -9.9, -9.8, ... this will depend on the resolution of your drawing window. Each of these f(r_n) values gives you a point (r_n, f(r_n)) that will correspond to a pixel on the screen.
So now if you zoom in on the orgin for example, your domain would be x=-5..5 for example, and might have the discrete values, r_n2=-5,-4.95,-4.9,...
If we count r_n1 and r_n2 we notice they have the same number of elements. It's just that r_n2 is feeding the function a different set of values, and in return you are getting a different set of points to plot (the zoomed points).
...ahhh.
I see what you are saying now with the, "do I multiply, divide, ..." Honestly I don't know if that would work, I would have to play around with it. So I'm assuming you are using a plotting routine of the language then, and not creating a generic plotting function. If you don't need to create a plotting function, why don't you just use software out there to do your task.
A quick google search has this, http://www.mathworks.com/access/helpdesk/help/toolbox/dotnetbuilder/ug/index.html?/access/helpdesk/help/toolbox/dotnetbuilder/ug/bqhr8rn-1.html
or you could use the free Maxima,
http://maxima.sourceforge.net/index.shtml
to do your plotting.