Performing Mathematical Operations with Metamaterials