A quick search on the use of "only if" returns questions asking about its use and meaning in mathematics, such as here, here and here, revealing confusion in its interpretation and use for some people.
Personally on first coming across "A only if B", it meant that B is the only condition that needs to be true for A to be true - which is incorrect. Even more confusing I find, is when its meaning can be taken from either philosophy as necessary conditions, or predicate logic as implication.
So my question is what is the history of "only if" used in mathematics and in particular where was the phrase first introduced?