This is not the inner product, the inner product is calculated above and is held in the $prod variable.