This thesis is based on two papers by the author and consists of two parts. We review the recent developments in the theory of multiple M2-branes and 3-algebras leading to multiple D2-brane theories. The inclusion of flux terms for the supersymmetric BLG and ABJM theories of closed M2-branes is discussed and then generalised to open M2-branes. Here the boundary condition is derived and different BPS configurations are examined where we find a mass deformed Basu-Harvey equation for the M2-M5 system. The Lorentzian 3-algebra is then employed for obtaining a theory of D2-branes in a flux background, we then obtain the new fuzzy funnel solution of the system of D2-D4 branes in a flux. Matrix theories and their compactifications as well as nonco...