Players must be both eligible by number and by position.
A player is eligible by number is he is wearing a number between 1-49, or between 80-99. A player is eligible by position if he is:
* A back - lined up with no part of his body breaking the plane of an imaginary line drawn parallel to the line of scrimmage through the waist of the nearest teammate who is legally on the line (2-32-3); OR
* A lineman who is on the end of his line. A lineman is one facing his opponent's goal line with the line of his shoulders approximately parallel to the line of scrimmage, and with his head or foot breaking an imaginary plane parallel to the line of scrimmage through the waist of the snapper. (2-32-9)
If the players are lined up:
81---------------------------75 72 66 51 79------------------------------87
19 36
7
34
All of the players except the 5 interior linemen are eligible receivers. They are all eligible by number; 81 and 87 on the end of the line, while 19, 36, and 34 are all backs.
If instead they line up as
81-----------------------75 72 66 51 79 36------------------------87
19
7
34
All 5 players are still eligible by number. However, 36 is on the line of scrimmage, and 87 on the same side is on the line of scrimmage as well. 36 is "covered up" by 87 - he's not on the end of the line, so he is no longer an eligible receiver. This formation is also perfectly legal - the rules say you must have AT LEAST 7 players on the line, but you can have more if you want.
Let's go one step further, as AB mentions:
81---------------------------75 72 66 51 79---------------------------87
19 36
7
58
81, 19, 36, and 87 are all eligible by both position, and by number. 58 would be eligible by position, but since he is wearing an ineligible number, he is not legally able to receive a forward pass. There's nothing illegal about him being lined up in the backfield, and 58 can take a handoff, or block for the QB, or even receive a backwards pass all night long. He can't receive a forward pass, though.