Let the sum of the 12 numbers before replacement be S. When one number (x) is replaced with 9, the new sum becomes:
\[ S + 9 - x \]
Since the average increases by 1.5, the new average is:
\[ \frac{S + 9 - x}{12} = \frac{S}{12} + 1.5 \]
Rearranging the equation:
\[ \frac{S + 9 - x}{12} - \frac{S}{12} = 1.5 \]
Simplifying further:
\[ \frac{9 - x}{12} = 1.5 \]
Multiplying both sides by 12:
\[ 9 - x = 18 \]
Solving for x:
\[ x = -9 \]
The number that was replaced is -9.