The prefix sub appears in many words, such as subway and substantial.
For subway, I take it as the way that is completely different from the way that I get used to. Moreover it is not the main way. Other words with sub, like subcategories and subscript, they all seem that sub makes the concept inferior.
But substantial turns the concept upside down. It means completely the opposite.
So, could someone shed some light on this for me please? So how do we know when sub is a prefix and when it isn't?