Modular Fractions

We only need 7 numbers for modulus (or clock) arithmetic mod 7 including working with fractions. Explore how to divide numbers and write fractions in modulus arithemtic.

Readme

Decipher a simple code based on the rule C=7P+17 (mod 26) where C is the code for the letter P from the alphabet. Rearrange the formula and use the inverse to decipher automatically.

Double Time

Crack this code which depends on taking pairs of letters and using two simultaneous relations and modulus arithmetic to encode the message.

Inverting Rational Functions

Stage: 5 Challenge Level:

One of our most prolific solvers, Patrick from Woodbridge School, sent in his thoughts on this problem

To invert a function, $f(x)$, the following procedure is used: say
$$f(x) = \frac{2x+9}{ x+2}$$
then the graph is
$$y = \frac{2x+9}{x+2}$$
It is inverted by replacing $x$ with $y$, and $y$ with $x$:

x = \frac{2y + 9}{y + 2}

and rearranging gives

y = \frac{9-2x}{x-2}
Thus
$$g(x) = \frac{9-2x}{x-2}$$
However, for values $x = \pm 2$, we have a denominator $0$ in one of the fractions, so these must be excluded from the domain of the functions.

For

y= \frac{x-7}{2x+1}

To invert this put

x = \frac{y-7}{2y+1}

Rearrange:

2xy + x - y = -7\,\quad y(2x-1) = -7-x\, \quad y = -\frac{x+7}{2x-1}

Thus, the inverse of $h$ is

k(x) = -\frac{x+7}{2x-1}

The procedure used by Patrick can be used to invert more general rational functions as follows

f(x)= \frac{ax+b}{cx+d}\quad\mbox{has inverse}\quad g(x)=\frac{b-dx}{cx-a}

To check this properly, consider

f(g(x))=\frac{a\left(\frac{b-dx}{cx-a}\right)+b}{c\left(\frac{b-dx}{cx-a}\right)+d}

This reduces to

f(g(x)) = \frac{a(b-dx)+b(cx-a)}{c(b-dx)+d(cx-a)}=\frac{(bc-ad)x}{bc-ad}

Which cancels to $x$, provided that $bc-ad \neq 0$. The same holds for $g(f(x))$.

On Ask NRICH, some discussion took place concerning the generalisation to rational functions involving quadratics.

Some progress can be made, in that if

y = f(x) = \frac{P(x)}{Q(x)}

then you might try to construct the inverse using the idea that $x\leftrightarrow y$, corresponding to reflecting the graph in the line $x=y$ so that

x = \frac{P(y)}{Q(y)}

Rearranging gives

Q(y)x = P(y)

This is a polynomial equation in $y$ of degree equal to the maximum of the degree of $P$ and $Q$.
However, a unique solution will only typically follow if $P(y)$ and $Q(y)$ are linear, and in general no algebraic solution will exist. Moreover, for the inverse to be unique, the function $f(x)$ must be one-to-one, which will not be the case for anything but linear rational functions.

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to embed rich mathematical tasks into everyday classroom practice. More information on many of our other activities can be found here.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 43, "mathjax_display_tex": 3, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8583172559738159, "perplexity_flag": "middle"}