The nonideal integrated optical N/spl times/N generalized Mach-Zehnder interferometer (GMZI) employing multimode interference (MMI) couplers is analyzed using transfer matrix techniques. Deviations in the phase relations and the power splitting ratio of the MMI couplers are included in the theory, along with the effects of phase errors in the interferometer arms. The predictions of the theory are compared to the response of a 4/spl times/4 GMZI which has been fabricated. The device is operated as both a variable-ratio power splitter and a switch by compensating for the phase errors in the interferometer arms, but the performance is ultimately limited by the nonideal imaging in the MMI couplers. The practicality of these applications is investigated by performing a tolerance analysis for the operation of 1/spl times/N power splitters and switches for N up to 10.