Pointwise Operations |
Hereinafter the following convention is used:
– small Greek letters are used to denote scalars;
– small Latin letters are used to denote vectors;
– capital Latin letters are used to denote matrices.
This topic contains the following sections:
Pointwise addition operation is identical to simple addition, as it allows summing each element of the given matrix with a scalar or with the corresponding element of the other matrix.
Operation | Description | Performance |
---|---|---|
matrix-scalar pointwise addition | Adds the given scalar to each element of the matrix: ![]() | |
matrix-matrix pointwise addition | Adds each element of the given matrix to the corresponding element of the defined matrix. This operation is identical to simple matrix-matrix addition. given: ![]() then: ![]() |
Pointwise subtraction allows calculating the difference between each element of the given matrix and a scalar or between each element of the given matrix and the corresponding element of the other defined matrix.
Operation | Description | Performance |
---|---|---|
matrix-scalar pointwise subtraction | Subtracts the given scalar from each element of the matrix: ![]()
Subtracts each element of the vector from the given scalar: ![]()
| |
matrix-matrix pointwise subtraction | Subtracts each element of the other matrix from the corresponding element of the given matrix: ![]() ![]()
Subtracts each element of the matrix from the corresponding element of another matrix: ![]()
|
Pointwise multiplication provides multiplying each element of the given matrix by a scalar or by the corresponding element of another given matrix.
Operation | Description | Performance |
---|---|---|
matrix-scalar pointwise multiplication | Multiplies each element of the matrix by the given scalar: ![]()
| |
matrix-matrix pointwise multiplication | Multiplies each element of the given matrix by the corresponding element of another given matrix: Given two matrices: ![]() the result will be: ![]()
|
Division of each element of the matrix by a scalar or by the corresponding element of the second matrix.
Operation | Description | Performance |
---|---|---|
matrix-scalar pointwise division | Divides each element of this matrix by the given scalar: ![]()
Divides a given scalar by each element of this matrix: ![]()
| |
matrix-matrix pointwise division | Divides each element of this matrix by the corresponding element of the other matrix: Given two matrices: ![]() the result will be: ![]()
Divides each element of the second matrix by the corresponding element of this matrix: ![]()
|