Where the word comes from
Rabbi comes from the Hebrew and Aramaic rav, "great" or "much", which as a noun meant a master or chief. Add the ending -i, "my", and rabbi means "my great one", "my master". In the time of Jesus it was a respectful way to address a teacher, much like "sir" or "master" in older English. John's Gospel explains it for Greek readers: "Rabbi, (which is to say, being interpreted, Master)" (John 1:38, KJV), using the Greek word for a teacher.
After the destruction of the temple in AD 70, and especially in the centuries that followed, "Rabbi" became a formal title for a recognised teacher of the Jewish law, and that is how it is used today. Historians are careful not to read the later, formal sense back into the Gospels.
How the Bible uses it
The Gospels show many people calling Jesus Rabbi: his first disciples (John 1:38, 49); Nicodemus, who says "Rabbi, we know that thou art a teacher come from God" (John 3:2, KJV); Peter at the Transfiguration (Mark 9:5); and the disciples when Jesus planned to return to Judaea before raising Lazarus (John 11:8). John the Baptist's followers gave the same title to John (John 3:26). It shows that people saw Jesus as a teacher who gathered disciples, even though he had no formal training (John 7:15).
In Matthew's Gospel the word has a sharp edge. Jesus criticises teachers who love to be greeted as Rabbi in the marketplaces, and tells his followers not to be called Rabbi, "for one is your Master, even Christ; and all ye are brethren" (Matthew 23:7-8, KJV). Notably, in Matthew the only disciple who calls Jesus Rabbi is Judas, at the Last Supper and again with the kiss of betrayal (26:25, 49); the others call him Lord.
Why it matters
The title reminds readers that Jesus was, among other things, a teacher who expected to be learned from and followed. It also carries his warning that in his community status is not something to be sought, because all are learners under one Teacher.
