Artificial intelligent assistant

Optimization with two variables I learn best by example, so forgive my impudence. My knowledge on calculus go as far as one variable only, so I struggle to find an application of total derivatives. Suppose I was to find the minimum values for $(x,y)$, does multivariate calculus prove handy? Suppose I was to find the minimum value for $(x,y)$ in $$f(x,y)=\sqrt{(x - a_1)^2 + (y - a_2)^2} + \sqrt{(x - b_1)^2 + (y - b_2)^2} $$ where $a_1,a_2,b_1$ and $b_2$ are arbitrary constants. How do I apply the concept of total derivatives to find the minimum value of $f$? I know that the maximum/minimum value for any given function $g(x)$ is $x$ when $g'(x)=0$, but does that necessarily translate when working with multiple variables? If so, how do I wrap my mind about it?

Take partial derivatives. Local extrema will be critical points): $$\frac{\partial f}{\partial x}(x,y) = 0$$ $$\frac{\partial f}{\partial y}(x,y) = 0$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1701067ca4792692378f872ca627bf86