We present an optical algorithm for parallel multiplication of vectors
and matrices using simple grating structures. The proposed scheme has
the advantage that it does not require optical elements. Light while
passing through the spatial light modulators, consisting of grating st
ructures, gets multiplied and summed at the output plane. The scheme h
as the flexibility to perform matrix operations without changing the h
ardware.