The pointwise product of two functions is another function, obtained by multiplying the results of the two functions. If f and g are both functions with domainX and codomainY, and elements of Y can be multiplied (for instance, Y could be some set of numbers), then the pointwise product of f and g is another function from X to Y which maps x ∈ X to f(x)g(x). Partial plot of a function f. ... In mathematics, the domain of a function is the set of all input values to the function. ... A codomain in mathematics is the set of output values associated with (or mapped to) the domain of inputs in a function. ...
Generalization
If both f and g have as their domain all possible assignments of a set of discrete variables, then their pointwise product is a function whose domain is constructed by all possible assignments of the union of both sets. The value of each assignment is calculated as the product of the values of both functions given to each one the subset of the assignment that is in its domain. In set theory and other branches of mathematics, the union of a collection of sets is the set that contains everything that belongs to any of the sets, but nothing else. ...
For example, given the function f1() for the boolean variables p and q, and f2() for the boolean variables q and r, both with the range in R, the pointwise product of f1() and f2() is shown in the next table: In mathematics, the range of a function is the set of all output values produced by that function. ...