By is used to say how we do something.
A. We use by in many expressions to say how we do something. For example, you can:
send something by post, do something, by hand, pay by cheque/by credit card (but pay in cash) or something can happen by mistake/by accident/by chance (but do something on purpose):
— Did you pay by cheque or in cash?
— We hadn't arranged to meet. We met by chance.
By + noun.
In these expressions we use by + noun without 'a' or 'the'. We say by chance/by cheque etc. (not 'by a chance/by a cheque').
By is used to say how somebody travels.
B. In the same way we use by to say how somebody travels:
by car/by train/by plane/by boat/by ship/by bus/by bicycle etc.
and by road/by rail/by air/by sea/by underground
— Liz usually goes to work by bus.
— Do you prefer to travel by air or by train?
But we say 'on foot':
— Did you come here by car or on foot?
You cannot use by if you say 'my car'/'the train' 'a taxi' etc. We use by + noun without ,a/the/my' etc. We say:
by car but in my car (not 'by my car')
by train but on the train (not 'by the train')
In for cars and taxis.
We use in for cars and taxis:
— They didn't come in their car. They came in a taxi.
On for bicycles and public.
We use on for bicycles and public transport (buses, trains etc.):
— We travelled on the 6.45 train.
Something is done by somebody/something.
C. We say 'something is done by somebody/something'
— Have you ever been bitten by a dog?
— The programme was watched by millions of people.
Usage of by and with.
Compare by and with:
— The door must have been opened with a key. (not 'by a key') (= somebody used a key to open it)
— The door must have been opened by somebody with a key.
We say 'a play by Shakespeare', 'a painting by Rembrandt', 'a novel by Tolstoy' etc.
— Have you read any books by Agatha Christie?
By means next to/beside.
D. By also means next to/beside:
— Come and sit by me. (= beside me)
— 'Where's the light switch?' 'By the door.'
By 100 pounds/by ten per cent.
E. Note the following use of by ...:
— Clare's salary has just gone up from 1,000 pounds a month to 1,100 pounds. So it has increased by 100 pounds/by ten per cent.
— John and Roger had a race over 100 metres. Roger won by about five metres.