“they worship me in vain.” The worship of the religious leaders was “vain,” i.e., pointless, worthless, and ineffective. It does not show true allegiance to God because it is not what God commanded and, in some cases, contradicts what God commanded (or contradicts the heart of what God commanded (see commentary on Matthew 15:9).
“doctrine.” The Greek word is didaskalia (#1319 διδασκαλία), a noun, and it has two primary meanings: It is used of the act of teaching or instruction (as if it was a verb), and it is also used for what is taught, i.e., the doctrine or material that was presented. In this verse, we felt “doctrine” was better than “teaching.” For more on didaskalia see commentary on 1 Tim. 4:13).