The LinkedIn system only allows you to message other members you are directly connected with (first degree connections) There is a group of premium members that have configured their profiles as "Open Profiles" which allows anyone on LinkedIn to message them, even if they are not first degree connections.
Open Profile Video
Here is how you can message an Open Profile LinkedIn member without having InMail or any other premium membership (Link).