Why the terms "unit" and "irreducible"? I'm trying to understand why in a ring we choose the names unit to an invertible element and irreducible element in this definition



Maybe historical reasons? 
For example, I suppose the second definition are named as prime elements because of the analogy to prime numbers.
Thanks in advance.
 A: Firstly, units behave "like $1$", which explains their name.
Historically, prime nuumbers were rather defined as what is here called irreducible. And for integers, "irreducible" and "prime" coincide.
So for the general ring theory, where they do not coincide in general, one had to coin at least one new name. Since irreducible was established for (the ring of) polynomials and this well matches the notion that these elements cannot be (nontrivially) split into several factors, the name prime could be used for the other notion. (Alternatively, one would have had to coin a name for if-it-divides-a-product-it-divides-a-factor numbers) 
A: For example, in $\Bbb Z$, the units are $\pm 1$, and the primes and irreducibles coincide. Moreover, it has unique factorization, and unique here means 'up to a unit', e.g. $-10=(-1)\cdot 2\cdot 5$, but $-1$ doesn't count here, as it is only a unit. Among the Gaussian integers, $\Bbb Z[i]$ also $\pm i$ are units.
It is easy to see that if $u$ is a unit (invertible), then for any element $a$, the generated ideals $(a)$ and $(ua)$ coincide.
