Uncle Sam (which has the same initials as United States) is a common national personification of the federal government of the United States or the country in general. Since the early 19th century, Uncle Sam has been a popular symbol of the U.S. government in American culture and a manifestation of patriotic emotion. Uncle Sam has also developed notoriety for his appearance in military propaganda, popularized by a famous 1917 World War I recruiting poster by J.M. Flagg.
According to legend, the character came into use during the War of 1812 and may have been named for Samuel Wilson. The actual origin is obscure. The first reference to Uncle Sam in formal literature (as distinct from newspapers) was in the 1816 allegorical book The Adventures of Uncle Sam, in Search After His Lost Honor by Frederick Augustus Fidfaddy, Esq.
While the figure of Uncle Sam specifically represents the government, the female figure of Columbia represents the United States as a nation. An archaic character, Brother Jonathan, was known to represent the American populace.
The earliest known personification of the United States was as a woman named Columbia, who first appeared in 1738 (pre-US) and sometimes was associated with another female personification, Lady Liberty.
With the American Revolutionary War of 1775 came Brother Jonathan, a male personification.
Uncle Sam finally appeared after the War of 1812. Columbia appeared with either Brother Jonathan or Uncle Sam, but her use declined as a national person in favor of Liberty, and she was effectively abandoned once she became the mascot of Columbia Pictures in the 1920s.
A March 24, 1810, journal entry by Isaac Mayo (a midshipman in the US Navy) states:
weighed anchor stood down the harbor, passed Sandy Hook, where there are two light-houses, and put to sea, first and the second day out most deadly seasick, oh could I have got onshore in the hight [sic] of it, I swear that uncle Sam, as they call him, would certainly forever have lost the services of at least one sailor.