Which person did you see in the room?

1. I saw a man who was in the room.
2. I saw the man who was in the room.
[Based on your explanation, #2 is a correct answer. What about #1? Is this answer possible? There were five people and and I saw a/one man who was in the room. Is this answer correct?]

3 answers

#1 is marginally OK, but simply saying, "I saw a man in the room" is all you need.
Thank you for your help. Then you mean both of the following answers are possible, don't you? And 'in the room' modifies 'a man' or 'the man'. Is that right? By the way, which answer is commonly used?
1. I saw a man in the room.
2. I saw the man in the room.
Yes, you're right. Either one is fine, depending on whether the man is one among many or is alone in the room.

Either one works, depending on the circumstances.