# Arithmetic function

The Arithmetic function performs an arithmetic operation between two rasters or a raster and a scalar and vice versa.

The inputs for this function are the following:

- Input Raster 1
- Input Raster 2
- Operation

If you want to use a constant value for every pixel value in a raster, click the Raster drop-down arrow within the Generate raster from constant section of the dialog box and choose either Raster 1 or Raster 2. Then specify a value in the Constant text box.

The Operation options are

- Plus—Outputs the sum of all the corresponding pixel values for each raster.
output = Raster1 + Raster2

- Minus—Outputs the difference between the corresponding pixel values for each raster. This can be used to calculate change detection.
output = Raster1 - Raster2

- Multiply—Outputs the product of the corresponding pixel values for each raster. This can be used to perform some cost functions.
output = Raster1 × Raster2

- Divide—Outputs the divisible result between the corresponding pixel values for each raster.
output = Raster1 ÷ Raster2

- Power—Outputs the product of the corresponding pixel values raised to the power of the input raster or scalar.
output = Raster1

^{Raster2} - Mode—Outputs the pixel value of all overlapping pixels that occurs the most. For example, if there are six bands in a raster, there will be six overlapping pixels. For the values 4, 5, 6, 4, 7, 9, the mode value is 4.

## Related Topics

8/21/2013