I read in Milnor's article "Link groups", where he defines invariants to classify links up to link homotopy, that the linking number is a complete invariant which can tell almost trivial two components links apart up to link homotopy. My question is how do I prove that the linking number is a complete invariant for link homotopy?
The linking number is the same as the homology class that one component represents in the complement of the other. You can reduce any $2$component link to a normal form by first homotoping one component to be an unknot. Then the complement of this component is homeomorphic to a solid torus, which has $\pi_1\cong\mathbb Z$. So all loops can be homotoped to one representative for each $n\in\mathbb Z$, where $n$ is the linking number.

$\begingroup$ Thank you for your answer! It helped me to look at the problem differently. To be more precise, I'd like to prove that if the linking number of the two components of the link is zero then the 2link is trivial (up to link homotopy). Can you provide more help on this? $\endgroup$ – Suki May 21 '17 at 14:35

$\begingroup$ @SoukainaHamri when you say 2link, are you referring to a 2component link or a link which has 2dimensional components? I.e. a link of spheres in 4space? If you are just referring to a link with 2 components, then the case of linking number 0 is a special case of my argument above. $\endgroup$ – Jim Conant May 21 '17 at 22:26

$\begingroup$ I meant the first case. Thank you for you help. $\endgroup$ – Suki May 21 '17 at 23:11

$\begingroup$ So just to clarify: do crossing changes on one component until it is unknotted. Then the other component is null homotopic in its complement, since it is a closed loop representing a trivial homology class in a solid torus. $\endgroup$ – Jim Conant May 21 '17 at 23:48

$\begingroup$ Thanks. I spent some time trying to fully understand your argument, now I'll try to prove that a curve that is homologically trivial in a solid torus is nullhomotopic. $\endgroup$ – Suki May 23 '17 at 21:59