To show likeness, compare is usually used with to.
Life is often compared to a dream.
She likes to compare herself to her mother.
My mother always compared me to my brother.
To show differences, compare is usually used with ‘with’.
We can’t compare dogs with cats. (There are far more differences between them than there are similarities.)
My mother was never satisfied with my academic performance. She always compared me with my brother who used to get better grades.
As a general rule, use compare with when differences are more important than similarities. Use compare to when similarities are more important. Of course, these differences are not very important.
There are several other idiomatic expressions that are often confused.
Correspond to / correspond with
To correspond to something is to match up with something.
This pin does not correspond to the receptacle it is supposed to fit into.
To correspond with somebody is to write letters back and forth.
I think you should correspond with the manager about this.
Differ from / differ with
You can differ with a person. Things can differ from totally different things.
Her mother differed with her over her decision to split with her boyfriend.
I beg to differ with you.
Our products differ from theirs because they are more intuitive.
Tablets differ from laptops in many ways. First, they do not have a physical keyword. Second,…
Exchange with / exchange for
We exchange something for something.
I would like to exchange my car for a faster one.
He exchanged dollars for euros.
I exchanged pleasantries with her.