1. He is in the river. [He is inside the river.]

2. He is sitting on the river. [He is sitting on the surface of the water.]
3. He is sitting in the river. [He is sitting on the bottom of the water.]
4. He is eating at the river.
5. He is eating at the riverside.
--------------------------------------
Is my expalnation correct? What does #4 mean? Does #4 mean #5? Or does #4 mean he is eating at a place on a ship or boat in the river?

I think 2 is impossible, but all the others are OK.

4 and 5 seem to mean the same thing -- that he is sitting on the bank of the river or very near the river's edge as he eats (lunch? snack? or?).

For example, on a map, if he is eating on the river, doesn't it mean that he is on a spot of the river eating?

[Corrected]

For example, on a map, if he is eating "at" the river, doesn't it mean that he is on a spot of the river eating?

To me, “at the river” means he’s next to it, maybe sitting on the bank or maybe in a folding chair next to the water’s edge.

Your explanations for sentences 1, 2, and 3 are correct:

1. "He is in the river" means that he is inside the water, swimming or immersed in it.
2. "He is sitting on the river" means that he is sitting on the surface of the water, possibly on a floating object like a boat or a raft.
3. "He is sitting in the river" means that he is sitting on the bottom of the river, most likely underwater.

However, sentence 4 is a bit ambiguous without further context. It could have multiple interpretations:

4. "He is eating at the river" could mean that he is eating food while being near or alongside the river, such as having a picnic or sitting on the riverbank.
5. "He is eating at the riverside" also means that he is eating near the river, specifically at the edge or bank of the river.

In this case, both sentences 4 and 5 imply that he is eating food near the river, but sentence 4 does not specify if he is on a boat or ship in the river. Without additional context, sentence 4 can be understood as eating near the river without being on a vessel within it.