Many years ago I learnt that "in a taxi" should be used when speaking about going/travelling by taxi. I doubt that using "in a taxi" is correct in this context. Can it be used instead of "by taxi"?
Both are correct, and interchangeable. It often depends on the speaker's preference.
Personally, I've heard "by taxi" a lot more than "in a taxi".
There is a difference between by taxi and in a taxi.
- by taxi - when you travel or go somewhere by taxi you refer to the taxi service, by means of the taxi service.
- in a taxi - when you travel or go somewhere in a taxi you may be referring to the vehicle, the taxi car. You may or may not be referring to the taxi service. The taxi car may or may not be on duty.
In most cases though they are interchangeable.
1Good point. "In a taxi" can mean "inside a taxi," that is, inside the vehicle. Aug 14, 2017 at 18:24
4@RalphC - Most of the time, though, it's just two sides of the same coin. It's hard to go somewhere "by taxi" unless you are "in the taxi," and it's rare to be "in a taxi" unless you are going somewhere "by taxi." (Of course, there are exceptions to everything...)– J.R. ♦Aug 14, 2017 at 21:56