Racemic mixture is an equimolecular mixture of enantiomeric pairs. The rotation caused by the molecules of one enantiomer is cancelled by the rotation caused by the molecules of other enantiomer.
This is the reason why racemic mixture becomes optically inactive.