Divisors of $-1$ are only $1$ and $-1$? I'm working through a discrete math textbook and I've come across this question with answer:
Prove that the only divisors of $−1$ are $−1$ and $1$.
Answer:
We established that $1$ divides any number; hence, it divides $−1$, and any nonzero number divides itself. Thus, $1$ and $−1$ are divisors of $−1$. To show that these are the only ones, we take $d$, a positive divisor of $−1$. Thus, $dk = −1$ for some integer $k$, and $(−1)dk = d(−k) = (−1)(−1) = 1$; hence, $d\mid 1$, and the only divisors of $1$ are $1$ and $−1$. Hence, $d = 1$ or $d = −1$.
I understand everything stated in the answer except for the part: $(-1)dk = d(-k) = (-1)(-1) = 1$
Perhaps someone could help me understand where the $(-1)dk$ comes from? And how we go from $d(-k)$ to $(-1)(-1)$?

The $(-1)dk$ bit is basically use trying to establish that, whatever $d$ is, it divides $1$ - which, since the only divisor of $1$ is itself, means $d=1$. By establishing $d=1$, then we establish that no other divisors to $-1$ exist, other than $1$ and $-1$ - this is because we assumed that $d$ was some other, arbitrary divisor, but show that such an assumption means $d=1$ (an analogous argument can probably show that $d=-1$ under a slightly different construction).
So... from the fact that $d$ divides $-1$, we know there exists some integer $k$ such that $dk = -1$.
So, we begin with just considering $(-1)dk$, and we want to see where that takes us.
As multiplication is commutative, $(-1)dk = d(-1)k$.
$(-1)k = -k$, obviously, so $(-1)dk = d(-1)k = d(-k)$.
However, recall that, since $d|-1 \;\; \Rightarrow \;\; dk = -1$, we also have $(-1)dk = (-1)(-1)$.
Thus, $d(-k) = (-1)(-1)$.
We know $(-1)(-1) = 1$, obviously, so we thus have $d(-k)=1$.
$d$ and $k$ by assumption are both integers (and thus $-k$ is too). Thus, $d|1$ and $-k|1$.
Since $d$ divides $1$, $d$ is a factor of $1$ by definition. However, the only factors of $1$ are ... just $1$ itself. Thus, $d=1$.
