Is there a way to define in a canonical way a $p$-adic valuation on complex number or at least on algebraic number, that extend the $p$-adic valuation on $\mathbb{Q}$? That is, is there a canonical embeding of $\overline{\mathbb{Q}}$ to $\overline{\mathbb{Q}_p}$.

To give a concret example taking the polynomial $P(Y)=Y^2+2Y+3$ which has to complex roots $z_1$ and $z_2$ that are respectivelly $-1\pm\sqrt{-2}$. Over the $3$-adics the same polynomial has two roots in $\mathbb{Q}_3$ because $\sqrt{-2}$ is in $\mathbb{Q}_3$ (Proposition 3.4.3 in Gouvea's Book $p$-adic Numbers: an ivertible element $b\in\mathbb{Z}_p^*$ is a square iff its reduction in $\mathbb{F}_p$ is a square). These roots are in fact in $\mathbb{Z}_3$, and with $x=\sqrt{-2}$ one has $x=\pm1$ mod $3\mathbb{Z}_3$ (they are two possibilities for quadratic residue of $1$ in $\mathbb{F}_3$) so that there is a root $r_1$ with $v(r_1)=1$ and a root $r_2$ with $v(r_2)=0$. So it is tempting to tell that on of the complex roots $z_1$ or $z_2$ has valuation 1 and the other has valuation 1.

I guess all this stuff is not raisonnaible because the two complex roots are interchangeable from the point of view of $\text{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$ whereas it is not the case for the two roots in $\mathbb{Q}_p$: $P(Y)$ is irreducible over $\mathbb{Q}$ and not over $\mathbb{Q}_3$. But maybe one can pass through $\mathbb{Q}_3[i][\sqrt{2}]$ where the $p$-adic valuation extend and calculate $v(i\sqrt{2})$ (I'm not comfortable enough on $p$-adic extensions to make that quickly). But certainly the problem come again in an other form... Any idea?


Your suspicion is correct, that there are many different imbeddings of $\overline{\mathbb Q}$ into $\overline{\mathbb Q_p}$. (The question about imbedding $\mathbb C$ is rather different...) The basic element of ambiguity is that (algebraic) extensions $k$ of $\mathbb Q$ give several different extensions $k_j$ of $\mathbb Q_p$, in $k\otimes_{\mathbb Q}\mathbb Q_p\approx k_1\oplus \ldots\oplus k_\ell$. So $k$ can map to any one of the $k_i$, and they need not be of the same degree over $\mathbb Q_p$.

For example, given square free integer $D$ (let's say not divisible by $2$ or $3$), we can find (by Dirichlet's theorem on primes in arithmetic progressions...) a prime $p$ (let's say not $2$ or $3$) such that there is a cube root of $D$ mod $p$, but no cube root of $1$ mod $p$. Then one cube root of $D$ gives the trivial extension of $\mathbb Q_p$, while the other two give quadratic extensions. That is, $x^3-D$ has a linear factor in $\mathbb Q_p[x]$, and an irreducible quadratic factor. :)