What would you say is the difference between "fraction" and "rational number"?

(Context: teaching an intro programming course and we have an example class for...these things. The existing materials call it "Fraction", but somehow I feel like RationalNumber or Rational would be better, but I can't articulate why.)

(Further context: I haven't looked up *anything* about this. Taking a "ask the hivemind first, do actual thinking later" approach...)

@ddrake a rational number is an equivalence class for a set of fractions. If a and b are integers with b positive and such that the only divisor that a and b have in common is 1, then the rational number a/b is the canonical representative of the equivalence class for the fractions of the form ma/mb where m is a nonzero integer

@ddrake at least that is how I teach it.

Consider the set S=ZxZ^+ (the Cartesian product of the integers and the positive integers) and we define (p,q)~(p’,q’) if pq’=p’q.

This is an equivalence relation on S, an equivalence class consists of all equivalent fractions, the canonical representative for a given equivalence class is a rational number.

@mathematicalsynesthesia @ddrake Perhaps 'fraction' doesn't feel right for numbers like 2/1 and 'rational' would be better.

Usually fraction implies 'not a whole number', e.g. 1/3. (But 3/3 is a fraction and is equivalent to a whole number, so who knows?)

#fraction #math

@foldworks @mathematicalsynesthesia actually I think "fraction" is a good description for "2/1". It's true that the real number represented by those three symbols is an integer, but it seems like when you're writing something in the form a/b, you are, somehow, writing a fraction.

Of course this is kinda getting into the weeds with semantics, semiotics, conventions for writing such things, and so on...