If $n$ is coprime with $a$ and $b$, then $n$ is coprime with $ab$ My attempt:
Let the prime factorizations of $a,b$ and $n$ be:
$$ a = \prod_{i=1}^{k} p_i^{\alpha_i}, \; \; b= \prod_{i=1}^{k} p_i^{\beta_i}, \; \; n=\prod_{i=1}^{k} p_i^{\gamma_i} $$
We know $$(a,n) = \prod_{i=1}^{k} p_i^{\min(\alpha_i, \gamma_i)} = 1$$
and
$$(b,n) = \prod_{i=1}^{k} p_i^{\min(\beta_i, \gamma_i)} = 1$$
But, $$(ab,n) = \prod_{i=1}^{k} p_i^{\min(\alpha_i + \beta_i, \gamma_i)} = \prod_{i=1}^{k} p_i^{\min(\alpha_i, \gamma_i)} \times \prod_{i=1}^{k} p_i^{\min(\beta_i, \gamma_i)}= 1$$
Therefore, result follows. Is this correct? any feedback? thanks
 A: As has been pointed out, the argument has a gap at the end. We show how to fix it, though sharing the view that there are better approaches. Let $p_1,\dots,p_k$ be all the primes that occur in the prime factorizations of $a$, $b$, and $n$. Then each of our numbers can be expressed uniquely as a product of shape $\prod p_i^{\mu_i}$, where the $\mu_i$ are $\ge 0$.
Let $p$ be one of these primes, and let $p^\alpha$, $p^\beta$, and $p^\gamma$ be, respectively,  the highest powers of $p$ that appear in the prime factorizations of $a$, $b$, and $n$. Then the highest power of  $p$ in the prime factorization of $ab$ is $\alpha+\beta$.
Since $a$ and $n$ are relatively prime, we have $\min(\alpha,\gamma)=0$. Similarly, $\min(\beta,\gamma)=0$.  It follows that $\min(\alpha+\beta,\gamma)=0$. This is clear, but let us verify it. If $\gamma=0$, it is obvious. And if $\gamma\ne 0$, then $\alpha=\beta=0$, so $\min(\alpha+\beta,\gamma)=0$.
A: I find proofs of these elementary number theoretic results via unique prime factorization to be both unnecessarily complicated and unnecessarily powerful. Since Andre et al. have already discussed your errors, I'll give you another way to approach the problem:
Fact: $\gcd(a,b) = 1\iff$ there exist $x,y\in\Bbb Z$ such that $ax + by = 1$.
So we know that there exist $x,y,x',y'\in\Bbb Z$ such that $ax + ny = 1$ and $bx' + ny' = 1$. We want to find $z,w\in\Bbb Z$ such that $abz + nw = 1$; this will complete the proof. (Hint: $1\cdot 1 = 1$.)
Edit: If you're bent on using UPF, then you could potentially change your argument as follows:
Since $\prod_{i} p_i^{\min(\alpha_i,\gamma_i)} = \prod_{i} p_i^{\min(\beta_i,\gamma_i)} = 1$, for any particular $i$, $\min(\alpha_i,\gamma_i) = \min(\beta_i,\gamma_i) = 0$. We want to show that for any $i$, $\min(\alpha_i + \beta_i,\gamma_i) = 0$. There are two cases:
1. $\gamma_i = 0$, in which case we are done.
2. $\gamma_i > 0$. In this case, the quantities $\min(\alpha_i,\gamma_i)$ and $\min(\beta_i,\gamma_i)$ are still both $0$, and since $\gamma_i > 0$, we must have $\alpha_i = \beta_i = 0$. I leave it to you to fill in any details.
A: Your argument is not correct because $\min(\alpha+\beta,\gamma)\neq\min(\alpha,\gamma)+\min(\beta,\gamma)$ in general.
Here is a proof ad absrdum. Assunme $(n,ab)\neq 1$, then there exist prime $p\in\mathbb{N}$ such that $p$ divides both $n$ and $ab$. Since $p$ is prime, then $p$ divides at least one of the factors in $ab$. Can you proceed from here to get a contradiction?  
A: The last line is wrong: $p_i^{\min(\alpha_i + \beta_i, \gamma_i)} \ne p_i^{\min(\alpha_i, \gamma_i)} \times p_i^{\min(\beta_i, \gamma_i)}.$ Try $\alpha_i = \beta_i = \gamma_i = 2$. 
