The first two lines of "When I Heard the Learn'd Astronomer" establishes the speaker and setting of the poem. The speaker listens to a "learn'd astronomer" who is displaying "the proofs, the figures [...] ranged in columns." Immediately, the poem sets up a contrast between the speaker, who is silently listening, and the astronomer, who is speaking and lecturing on his expertise. In this case, the astronomer is lecturing on celestial objects of the universe, specifically the stars.
The lines, therefore, stress the highly educated and scientific nature of the astronomer. The astronomer is described as "learn'd," which indicates the astronomer's high level of education and years of study. Moreover, the astronomer has calculated "proofs" and "figures" to show the audience, requiring mathematical expertise. The astronomer displays these mathematical evidences in "columns," indicating a methodical and technical mind.
"When I Heard the Learn'd Astronomer" is not written in any particular form. Rather, it is an example of Whitman's characteristic first-person free verse. The first line, however, is written in the stress pattern of trochaic pentameter (stressed-unstressed):
When I | heard the | learn'd as- | trono- | mer,
The downward, falling rhythm of trochaic meter reflects the downward progression of the speaker's mood while listening to the astronomer's lecture. Moreover, the regularity of the rhythm stresses the monotony of the lecture. The last trochee in the line is missing a syllable (this is called catalexis), ending the line on a forceful note, capturing the assertiveness of the astronomer. Additionally, in line 1, the internal slant rhyme between "heard" and learn'd" enhances the rhythm and musicality across the line.
Line 2 does not contain such regular trochaic meter:
When the proofs, the figures, were ranged in columns before me,
However, the two instances of caesura after "proofs" and "figures" add a strong sense of rhythm to the line. The use of anaphora in the opening "When" in lines 1 and 2 also creates a rhythm through repetition. At the same time, this anaphora across the two lines further emphasizes the monotony of the setting, a monotony which will be developed in the next two lines.