A main idea is the topic of a paragraph or a segment of text; a theme is a topic that is repeated throughout the full body of a work. A main idea is intended to summarize what a section of text is about. A theme is intended to provide a relevant source of reflection in relation to the text.
A main idea typically relates to nonfiction works such as essays. In a good essay, the main idea of each paragraph is directly stated. For example, in an essay about the need for more public transportation options in the United States, the main idea of one of the supporting paragraphs might be "Private automobiles have been one of the biggest contributors to global warming." A theme, on the other hand, typically refers to a work of fiction and is almost never directly stated. Rather, writers use symbols or motifs to represent the theme throughout a work. It is up to the reader to detect the theme by connecting the clues that the author inserts. Main ideas often support a subject; themes often provide material for contemplation in addition to the subject of the book. In this context, main ideas are more direct while themes are more abstract.