Waltham, Newton, Cambridge, etc.. are very dense.
There is a clear delineation in density with a lot of these. Usually it's whether the town/city is inside 95, but Lexington is not very dense and is inside.. I think Lexington fits the mold of suburb where as Newton & Waltham feel urban.
Suburb evokes lots of single family homes with yards, and a fairly car-centric environment. That doesn't fit Cambridge, which is much more urban. That said, there are ultra-wealthy pockets of Cambridge that look and feel a little more like a suburb, but they are small.
Like SF, Boston is somewhat unusual in that the city itself is pretty small both in surface area (48 sq miles) and population (~685k). The Greater Boston area is a different story, of course (cf. https://en.wikipedia.org/wiki/Greater_Boston). But that includes Cambridge, and Somerville, and all the neighboring cities to Boston.
Someone else in this thread said that Cambridge is to Boston like Oakland is to SF. That sounds about right, though Oakland is much bigger (both in population and surface area) than Cambridge.
Also, outside the immediate Boston-area, MIT and Harvard are usually thought of as being in Boston. But, they're actually in Cambridge.
For most people, Cambridge is "the side of Boston to the north of the Charles River" - for many, it's just a neighborhood in Boston (no offense meant to any Cambridge natives).
https://www.google.com/maps/place/Boston,+MA/@42.3145182,-71...
Although it is more akin to a left brain-right brain situation. 2 similar structures separated by one physical divide.
It helps to think of Boston and Cambridge as one city. (Though I am sure many don't like that) The city of Boston itself is pretty small to begin with anyways.