TITLE: Negative factors of a number
QUESTION [10 upvotes]: Can a factor of a number be negative?
Is $-5$ a factor of $25$ or $-25$?
A number is said to be prime if it has two factors : $1$ and the number itself. So if $-5$ can be a factor of $5$, how to define the prime numbers?
Thanks.

REPLY [3 votes]: Indeed, when we enlarge from positive integers to all integers then we have to deal with the fact that this introduces a nontrivial unit (invertible) element $\,-1,$ which may spoil the uniqueness of prime factorizations (up to order), since, e.g. $\,pq = (-p)(-q)\,$ by $\,(-1)(-1) = 1.$  Similarly for polynomials with rational coefficients. Here every nonzero rational number $\,r\,$ is a unit  (invertible) $\ r r^{-1} = 1,\,$ so $\,p(x) q(x) =  (r p(x)) (r^{-1} q(x)).\,$  There are various ways to remedy this. 
First, from  the set of all unit multiples of a prime, we could choose some "natural" representative, and call only that element prime. For integers, a natural choice is the positive representative, and for polynomials one that is monic  (leading coefficient $= 1).$ Such representatives are sometimes called unit-normalized representatives.
Alternatively, we may permit all unit multiples to be prime, then alter our statement of uniqueness of prime factorizations to say: prime factorizations are unique up to order and unit multiples. 
If you study abstract algebra you will learn that there is a natural algebraic way of "ignoring" these pesky nontrivial units when studying factorization. Namely, since the units form a group $\,U,\,$ we can mod out by $\,U.\,$ This is the algebraic way of working multiplicatively "up to unit multiples".