What side did Robert E. Lee command?

Why does Lee decide to invade the North?

Since you state that Lee decided to invade the North, you already answered your first question. <g>

Check this article for your second answer.

http://www.historyofwar.org/articles/wars_american_civil_war05_invading_north.html

He believed that for the Confederacy to survive he needed to win a major victory on Northern soil.

Right. You can read more in that site and come up with more details.

Robert E. Lee commanded the Confederate Army of Northern Virginia during the American Civil War. He served as the principal commander of Confederate forces in the Eastern Theater of the war.

As for why Lee decided to invade the North, there were several factors at play. First, Lee hoped that a victory on Northern soil would boost the morale of the Confederate troops and potentially persuade European powers, like France and Britain, to recognize the Confederate States of America as an independent nation. Second, by taking the war to the North, Lee aimed to relieve the pressure on the Confederate capital of Richmond, Virginia, which had been subject to numerous Union offensives. Third, Lee believed that a successful invasion might undermine Northern public support for the war and force the Union government into peace negotiations. Finally, Lee's decision to invade the North was also influenced by a desire to secure much-needed supplies, particularly in terms of food and horses.

Understanding the motivations behind Lee's decision requires examining primary sources such as letters, memoirs, and historical records. Numerous books have been written on the subject by historians, which provide insight into Lee's thinking and the strategic considerations leading up to the invasion of the North.