Antonym to "on" (spatial relation)
Solution 1:
There is no antonym that would apply to both situations. The descriptions of a book being on the table or a picture being on the wall look like descriptions of spatial relations, but they are actually special cases of a more abstract relationship.
For example, the oil stains are on the dress, the news is on the radio, the passenger is on the bus, or the family is on the dole.
There are many questions on this and other sites that deal with when to use in and when to use on (I’m writing this on a phone and it’s awkward to look these up for citation).
The typical reason for using on is that the first thing can move around relation to the second thing, or could have in the past, i.e. a man on a car conjures up a different image than a man in a car.
However, the action that associates the first thing with the second thing is typically more specific, and easier to negate.
The book may be set down on a table, in which case it can be lifted up. A picture may be attached to a wall, after which it can be detached from, etc.
When you look for an antonym to on, however, you’re pretty much stuck with off, which will usually make sense when there’s an imagined action behind it. Without an imagined action, i.e. where on really means associated with, the “opposite sense” of not being associated with can usually cover a lot of possibilities, and therefore doesn’t feel quite right as an antonym.