The origin of the nucleus

Analysis initiated by Carl Woese, suggested that Eukarya is most closely related to the prokaryotic domain Archaea. The nucleus is hypothesized to have originated from infoldings of the cellular membrane (also called the plasma membrane). Imagine a group of brown paper bags. If you began to compress them together, the paper would begin to fold in on itself. This is a good metaphor for the infolding hypothesis. Evidence to supports this comes from the presence of such infoldings in prokaryotic species. Unlike a paper bag, the cellular membrane is composed of phospholipids, which are capable of detaching from the outer membrane. The nuclear origin hypothesis suggests this happened creating an internal membrane system. These internal membranes cornered and encased the DNA as the phospholipids reattached to each other. This became the nuclear envelope. 

It is thought that the primary advantage the nucleus provides is gene regulation, by separating transcription and translation. Transcription is the process in which a segment of DNA (known as a gene) codes for a messenger RNA (mRNA). Following transcription, eukaryotes are capable of processing the mRNA by removing segments (introns) prior to leaving the nucleus. The mature mRNA leaves the nucleus through a nuclear pore and travel to a ribosome. The ribosome reads the mature mRNA and with the help of transfer RNA (tRNA) links amino acids in a specific sequence generating a protein. Prokaryotes (which don’t have a nucleus) go through transcription and translation simultaneously, and therefore are incapable of gene regulation via post-transcriptional modification.