TITLE: Does $f(a,b)$ being directly proportional to $a$ and $b$ separately imply that $f(a,b)$ is directly proportional to $ab?$
QUESTION [5 upvotes]: For example, in physics, if $$\text{F} \propto m_1m_2$$ and $$\text{F} \propto \frac{1}{r^2},$$ then $$\text{F} \propto (m_1m_2)\left(\frac{1}{r^2}\right)= \frac{m_1m_2}{r^2}.$$
This property (combining proportionality) intuitively makes sense, but I have never seen it formally written in a textbook.
Could someone please rigorously prove this property (and fully specify its conditions?), or give a counterexample?
P.S. I know that this question has been answered, including here, but I do not understand the explanations: e.g., I don’t understand how $k=f(C)$ or $k′=g(B).$

REPLY [3 votes]: Theorem
Let $y=f(a,b)$ on $\mathbb R^2$ so that variables $a$ and $b$ are independent of each other.
Then $$y\propto ab$$ iff $$\:y\propto a\quad\text {and}\quad y\propto b.$$
Proof

Suppose that $\,y\propto ab,$ i.e., $y$ is jointly proportional to $a$ and $b.$ Then there exists $k\in\mathbb R{\setminus}\{0\}$ such that $$∀(a,b){\in}\mathbb R^2\quad y=k\big(ab\big).$$
So, there exists $k\in\mathbb R{\setminus}\{0\}$ such that  \begin{align}&∀(a,b){\in}\mathbb R^2\quad y=\big(kb\big)a\\\text{and}\quad&∀(a,b){\in}\mathbb R^2\quad y=\big(ka\big)b.\end{align}
So, there exist non-identically-zero functions $g$ and $h$ on $\mathbb R$ such that \begin{align}&∀(a,b){\in}\mathbb R^2\quad y=\big(g(b)\big)a\\\text{and}\quad&∀(a,b){\in}\mathbb R^2\quad y=\big(h(a)\big)b;\end{align} that is, $$y\propto a\quad\text {and}\quad y\propto b.$$

Suppose that $\,y\propto a\:$ and $\:y\propto b.$ Then there exist functions $g$ and $h$ on $\mathbb R$ such that  \begin{align}∀(a,b){\in}\mathbb R^2\quad&\big(g(b)\big)a=y=\big(h(a)\big)b \\\text{and}\quad&g(b)\not\equiv0 \\\text{and}\quad&h(a)\not\equiv0.\end{align}
Putting $(1,0)$ shows that $g(0)=0.$ Thus, from the second conjunct, $g(t)\ne0$ for some nonzero $t.$ Putting $(a,t):$ \begin{align}∀a{\in}\mathbb R\quad&\big(g(t)\big)a=\big(h(a)\big)t\\∀a{\in}\mathbb R\quad&h(a)=\frac at g(t);\\
∀(a,b){\in}\mathbb R^2\quad&y=\frac {g(t)}tab.\end{align}
Hence, there exists $k\in\mathbb R{\setminus}\{0\}$ such that $$∀(a,b){\in}\mathbb R^2\quad y=k\big(ab\big);$$ that is, $$y\propto ab.$$



In the following examples, there's an additional dependency between variables $x$ and $y$, so the theorem's condition is not satisfied.

Let $z=y$ and $y=2x.$
Then $z=2x.$
Now, there exists no real $k$ such that for each $x,\;2x=k(2x^2).$
So, there exists no real $k$ such that for each $x$ and $y,\;z=k(xy).$
Thus, $z$ is directly proportional to each of $x$ and $y,$ but not
to $xy.$

Let $z=3xy$ and $y=2x.$
Then $z=6x^2.$
Now, there exists no real $k$ such that for each $x,\;6x^2=kx.$
So, there exists no real $k$ such that for each $x,\;z=kx.$
Thus, $z$ is directly proportional to $xy,$ but not to $x.$