The nonlinear partial differential equation of motion for an incompressible, non-Newtonian power-law fluid flowing over flat plate under the influence of a magnetic field and a pressure gradient, and with or without fluid injection or ejection, is transformed to a nonlinear third-order ordinary differential equation by using a stream function and a similarity transformation.The necessary boundary conditions are developed for flow with and without fluid injection (or ejection), and a solution for four different power-law fluids, including a Newtonian fluid, is presented.The controlling equation includes, as special cases, the Falkner-Skan equation and the Blasius equation.