### Problem with factor and imag.

~~Hi everyone!~~

I'm new to ~~Sagemath, ~~SageMath, and I'm not sure what's going ~~wrong. When I give the following commands ~~wrong.

~~a,b,z = var('a,b,z')
P = a~~*x - b*x
Q = a*imag(z)-b*imag(z)
show(P.factor());
show(Q.factor());Here are the commands I enter and results I get:

I get

(a−b)x
0

```
sage: a, b, z = var('a, b, z')
sage: P = a*x - b*x
sage: Q = a*imag(z) - b*imag(z)
sage: P.factor()
(a - b)*x
sage: Q.factor()
0
```

Why is ~~Q ~~`Q`

factoring to ~~0?~~

Thanks for your help.`0`

?