English is a funny language with some inherent structures which are beyond the understanding of even eminent linguists leave alone lay persons. There are plenty of usages which confound us but here I am going to talk about a simple word which I have almost always interpreted to have opposite of its actual meaning.
In case of the first two words here, the prefix ‘in’ creates words which are antonyms but in case of valuable it gets confusing. Invaluable doesn’t mean worthless-it means something which is so valuable that its cost can’t be estimated. Clearly when valuable joins the prefix ‘in’ its value magnifies positively instead of becoming negative as usual for other words. Arithmetic rhythm is at work here or so it seems.
P.S. : I am sure there are plenty of cases where prefix ‘in’ doesn’t make the antonym of the word it’s added to-another example is habitable and inhabitable which mean the same thing. In a way valuable and invaluable are antonyms–if valuable is taken in a negative sense-then something valuable has a limited value whereas invaluable is so precious that its value can’t be esteemed.