does the speaker of the house have to be a representative
The Constitution does not require the Speaker to be an elected member of the House of Representatives, although every Speaker thus far has been. The Speaker is second in the United States presidential line of succession, after the Vice President and ahead of the President pro tempore of the Senate.
Speaker of the United States House of Representatives