<s>[INST] Why dividing by zero still works Today, I was at a class. There was a question:

If $x = 2 +i$, find the value of $x^3 - 3x^2 + 2x - 1$.

What my teacher did was this:
$x = 2 + i \;\Rightarrow \; x - 2 = i \; \Rightarrow \; (x - 2)^2 = -1 \; \Rightarrow \; x^2 - 4x + 4  = -1 \; \Rightarrow \; x^2 - 4x + 5 = 0 $. Now he divided $x^3 - 3x^2 + 2x - 1$ by $x^2 - 4x + 5$.
The quotient was $x + 1$ and the remainder $x - 6$. Now since $\rm dividend = quotient\cdot divisor + remainder$, he concluded that $x^3 - 3x^2 + 2x - 1 = x-6$ since the divisor is $0$.
Plugging $2 + i$ into $x - 6$, we get $-4 + i$.
But my question is, how was he able to divide by zero in the first place? Why did dividing by zero work in this case?
 [/INST] The division was a division in the polynomial ring $\mathbb{C}[x]$
by a non-zero polynomial
For example: by dividing $$x^{2}+2x+1$$ by $$x+1$$ which is a non-zero
polynomial we get $$(x+1)(x+1)=x^{2}+2x+1$$ since the quotient is
$x+1$ and the reminder is $0$. The result is an equality
of polynomials, and it is valid if you set any element in the field
in those polynomials, even $x=-1$.
</s>