ecl-logo Documentation

LinearFunctionQ

LinearFunctionQ[func]out

determines if the provided func is a linear function in the form of (a#+b)&, where a is the non-zero slope of the line, b is the y-intercept, and the # is the independent variable.

Details

  • This function does not always evaluate. It must be given a Function as input in order to evaluate.
  • When provided with a 'func' that has more than one variable, the function will only check linearity with respect to the first variable.
  • Input
    Output
    General Options
    Attributes
  • Listable

Examples

Basic Examples  (2)

Test whether one function is a linear function:

A non-linear function will not pass LinearFunctionQ:

Additional Examples  (3)

A function with zero slope will not pass LinearFunctionQ:

The function is only checking linearity with respect to the first variable:

The function is only checking linearity with respect to the first variable:

Options  (1)

Log  (1)

Use the Log Option to allow logarithmic functions to pass LinearFunctionQ:

Attributes  (1)

Listable  (1)

Test whether several functions is are linear functions: