The term "rab" meant "great" or "master," "teacher." "Rabbi" meant "my master," and was a term of greater respect. The opposite of "master" in this context is not "slave," but "learner" or "disciple." In Jewish writings during the Exile, "rab" referred to Babylonian teachers and "rabbi" to Jewish teachers of the Law of Moses. The term was used to address anyone learned in the Law, whether layman or priest. Only in post-New Testament times has rabbi come to designate an ordained Jewish teacher.
In the Gospels, the word rabbi carries no suggestion of official appointment. John the Baptist's disciples called him "Rabbi" John 3.26). Jesus was called "Rabbi" by his own disciples, by inquirers, and by at least one Pharisee (John 3.2).
"Rabboni" is an even more respectful term, meaning "my lord, my master." In Mark 10.51 where it was used by a blindman whom Jesus healed, it is rendered "Lord" in some translations of the Bible. In John 20.16, Mary Magdalene uses the term when addressing the risen Jesus in the garden outside the empty tomb.