Linear transformation (or linear mapping) is a mapping between two vector spaces that preserves the operations of vector addition and scalar multiplication.
Linear transformations can be represented by matrices. If is a linear mapping and is a column vector, then
for some matrix , called the transformation matrix of .
Affine transformation is the composition of two functions: a linear transformation matrix and a translation vector . It can be represented as:
It can also be represented by homogeneous coordinates as:
p-norm: Let be a real number, the p-norm (also called -norm) of vector is defined as:
The slope of the tangent line to the graph of at can be express the limit of the slope of :
If the limit exists, then the is differentiable at .
The derivative of at :
If a variable depends on the variable , whitch itself depends on the variable , then depends on as well, via the intermediate variable . The derivative is:
e.g. Consider the function:
It can be decomposed as:
And the derivatives are:
For a scalar-valued differentiable function , its gradient
is defined at the point in n-dimensional space as the vector:
e.g. Consider the function , the gradient function is:
At a point , the gradient is:
To compute derivatives, there are some ways:
The derivative of :
([(x0, x**2),
(x1, (3*x + x0 + 4)**2),
(x2, (9*x + 3*x0 + x1 + 16)**2),
(x3, (27*x + 9*x0 + 3*x1 + x2 + 52)**2),
(x4, (81*x + 27*x0 + 9*x1 + 3*x2 + x3 + 160)**2)],
[729*x + 243*x0 + 81*x1 + 27*x2 + 9*x3 + 3*x4 + (243*x + 81*x0 + 27*x1 + 9*x2 + 3*x3 + x4 + 484)**2 + 1456])
Two modes:
A function is constructed using intermediate variables such that
For computing the derivative of with respect to , we start by associating with each intermediate variable a derivative
Consider the evaluation trace of the function
For a function , it cost evaluations with the forward mode.
The reverse mode propagates derivatives backward from a given output by complementing each intermediate variable with an adjoint
e.g., the variable can affect through affecting and , so its contribution to the change in is given by
Consider the evaluation trace of the function
For a function , it cost evaluations with the reverse mode.