Using the notation that a bar over a digit or string of digits denotes them repeating infinitely, let #x = 0.bar(3)#

#=> 10x = 3.bar(3)#

#=> 10x - x = 3.bar(3)-0.bar(3)#

#=> 9x = 3#

#:. x = 3/9 = 1/3#

This technique will actually work for converting any repeating decimal into a fraction. Suppose we have a repeating decimal #x=0.bar(a_1a_2...a_n)# (that is, with #n# repeating digits). We multiply #x# by #10^n#, subtract #x#, and then divide by #10^n-1# to obtain the fractional form:

#10^nx = a_1a_2...a_n.bar(a_1a_2...a_n)#

#=> 10^nx - x = a_1a_2...a_n.bar(a_2a_2...a_n)-0.bar(a_1a_2...a_n)#

#=> x(10^n-1) = a_1a_2...a_n#

#:. x = (a_1a_2...a_n)/(10^n-1)#

Note that once we know the technique, we can skip to the end as a shortcut: #0.bar(a_1a_2...a_n) = (a_1a_2...a_n)/(10^n-1)#. In the given problem, only a single digit, #3#, is repeating, so the shortcut gives us: #0.bar(3) = 3/(10^1-1) = 3/9 = 1/3#.

We can also modify the technique to handle cases where the repeating portion does not begin until after a finite number of non-repeating digits, such as numbers like #0.1232323...=0.1bar(23)#. The idea is still to multiply by an appropriate power of #10# and then subtracting away the repeating portion. As an exercise, a student can try finding the fractional form of such a number.