The array reduction function SUM, PRODUCT, MAXVAL, MINVAL, COUNT, ANY, and ALL perform numerical, logical and counting operations on arrays. They may be applied to a whole array to give a scalar result or they may be applied over a given dimension to yield a result of rank reduced by one.