When $\lfloor{ab}\rfloor = \lfloor{a}\rfloor\lfloor{b}\rfloor$

I was just thinking about the equality (for a bit of fun)

$\lfloor ab \rfloor = \lfloor a\rfloor\lfloor b \rfloor$

for non-integer $a$ and $b$. I was wondering if anyone could point me to some lecture notes or something such where this features, since I can't find anything on google. Alternatively, is there some trivial condition that I'm overlooking? I've been scribbling away for a while just writing some things down and was wondering if anybody could tell me anything about the conditions to place on that equality?

My thought process was as follows: let $a = a_0.a_1a_2a_3...$ and $b=b_0.b_1b_2b_3...$. From this, we can write

$$a = a_0 + \sum_{n=1}^k \frac{a_k}{10^n}\ \ \ \text{and}\ \ \ b = b_0 + \sum_{m=1}^j \frac{b_m}{10^m}$$

and then

\begin{align} ab &= \left(a_0 + \sum_{n=1}^k \frac{a_k}{10^n}\right) \left(b_0 + \sum_{m=1}^j \frac{b_m}{10^m}\right)\\ &= a_0b_0 + b_0\sum_{n=1}^k \frac{a_k}{10^n} + a_0\sum_{m=1}^j \frac{b_m}{10^m} + \left(\sum_{n=1}^k \frac{a_k}{10^n}\right)\left(\sum_{m=1}^j \frac{b_m}{10^m}\right) \end{align}

and then we simply have that

$\lfloor a b \rfloor = \lfloor a \rfloor \lfloor b\rfloor$ iff $$0 < b_0\sum_{n=1}^k \frac{a_k}{10^n} + a_0\sum_{m=1}^j \frac{b_m}{10^m} + \left(\sum_{n=1}^k \frac{a_k}{10^n}\right)\left(\sum_{m=1}^j \frac{b_m}{10^m}\right) <1$$

... more concsely, see @MorganRogers' answer for some better use of notation.


Solution 1:

As suggested in the comments, let's expand the LHS a little. I'll use $\langle a\rangle$ to represent the fractional part of $a$. $$\lfloor{ab}\rfloor = \lfloor{(\lfloor{a}\rfloor + \langle a\rangle)(\lfloor{b}\rfloor + \langle b\rangle)}\rfloor = \lfloor{a}\rfloor \lfloor{b}\rfloor + \big\lfloor \lfloor{a}\rfloor \langle b\rangle + \lfloor{b}\rfloor \langle a\rangle + \langle a \rangle \langle b\rangle \big\rfloor.$$

Thus a necessary and sufficient condition for the equation you propose to hold is that $$0 < \lfloor{a}\rfloor \langle b\rangle + \lfloor{b}\rfloor \langle a\rangle + \langle a \rangle \langle b\rangle < 1.$$

Solution 2:

In the first quadrant, in the square tile $[A,A+1)\times[B,B+1)$, we have

$$\lfloor a\rfloor \lfloor b\rfloor=AB$$ and $$AB\le ab<(A+1)(B+1).$$

We are looking for the points such that

$$AB\le ab<AB+1,$$ which form a subset of the tile delimited by the equilateral hyperbola $$ab=AB+1.$$

For all tiles such that $AB=0$, the solutions cover the area $$0\le ab<1,$$ i.e. the space between the axis and $ab=1$.

For the other tiles, the intersections of the hyperbola with the edges are

$$\begin{align} a&=A\to &Ab=AB+1\to &b=B+\frac1A,\\ a&=A+1\to&(A+1)b=AB+1\to &b=\frac{AB+1}{A+1}\le B,\\ b&=B\to &aB=AB+1\to &b=A+\frac1B,\\ b&=B+1\to &a(B+1)=AB+1\to &b=\frac{AB+1}{B+1}\le A.\\ \end{align}$$

So the solution area is the inside of the curvilinear triangle with straight sides $a=A,b=B$ and the branch of hyperbola $ab=AB+1$, from $(A,B+1/A)$ to $(A+1/B,B)$. The area of the triangle is roughly proportional to $1/AB$.

The study will be similar for the other quadrants.

Solution 3:

We assume that $a$ and $b$ are nonnegative. Suppose that $m \le a < m + 1$ and $n \le b < n + 1$. Then $mn \le ab < (m+1)(n+1)$. So it is immediately true that $$ \lfloor a \rfloor \lfloor b \rfloor \le \lfloor ab \rfloor. $$ The two are equal if and only if additionally we have that $ab < mn + 1$. I.e., $$ a b - \lfloor a \rfloor \lfloor b \rfloor < 1 $$ If we want to write $a = m + r$, $b = n + s$, where $0 \le r, s, < 1$, then this becomes the statement that $$ ms + nr + rs < 1. $$ The $rs$ factor is bounded by both $r$ and $s$, so this expression is about $ms + nr$. Roughly speaking, this says that if $a$ and $b$ are large and around the order of $M$, then their fractional parts must add to at most $\frac{1}{2M}$.

Solution 4:

$a = [a] + \{a\}$ where $[a]$ is an integer and $0 \le \{a\} <1$.

So $[ab] = [[a][b] + [b]\{a\} + [a]\{b\} + \{a\}\{b\}] = [a][b] + [[b]\{a\} + [a]\{b\} + \{a\}\{b\}] = [a][b] \iff 0 \le [b]\{a\} + [a]\{b\} + \{a\}\{b\} < 1$

So we need among other things that $\{a\} < \frac 1b - \frac{[a]\{b\}}b$ and $\{b\} < \frac 1a - \frac{[b]\{a\}}a$.

That's quite a restriction.

Basically the larger the $a$ and $b$ are the fractional parts must be miniscule.

For example: if $a = 2\frac 14$ then $b < 4- 8\{b\});\{b\} < \frac 12;$ and $\{b\} < 4/9 - \frac{[b]}9$. So if, say $3 \le b < 4$ we'd have $\{b\} < 1/9$.

So $2.25$ and $3.1$ will do as $[2.25*3.1] = [6.975] = 6 = [2.25][3.1]$. See how close that got to failing?