A microelectromechanical (MEM) inertial sensor is disclosed which can be used to sense a linear acceleration, or a Coriolis acceleration due to an angular rotation rate, or both. The MEM inertial sensor has a proof mass which is supported on a bridge extending across an opening through a substrate, with the proof mass being balanced on the bridge by a pivot, or suspended from the bridge by the pivot. The proof mass can be oscillated in a tangential direction in the plane of the substrate, with any out-of-plane movement of the proof mass in response to a sensed acceleration being optically detected using transmission gratings located about an outer edge of the proof mass to generate a diffracted light pattern which changes with the out-of-plane movement of the proof mass.