Transformations#
Informally, function is a rule that accepts inputs and produces outputs. For instance, \(f(x)=x^2\) is a function that accepts one number \(x\) as its input, and outputs the square of that number: \(f(2)=4\).
Consider the matrix equation:
If we vary \(\mathbf{u}\), then \(\mathbf{v}\) will also vary; in this way, we think of \(\mathbf{A}\) as function with independent variable \(\mathbf{u}\) (which is a vector in \(\mathbb{R}^n\)) and dependent variable \(\mathbf{v}\) (which is a vector in \(\mathbb{R}^m\)).
At this point it is convenient to fix our ideas and terminology regarding functions, which we will call transformations. This allows us to systematize our discussion of matrices as functions.
u = vec(2, -1, 3)
F = matrix([[2, 1, 0], [0, 1, 0], [0, 0, 0.5]])
u.transform(F)
Vector3(3, -1, 1.5)
Matrices as functions - transformation matrix#
If \(\mathbf{A}\) has \(n\) columns, then it only makes sense to multiply \(\mathbf{A}\) by vectors with \(n\) entries. This is why the domain of transformation is \(\mathbb{R}^n\). If \(\mathbf{A}\) has \(m\) rows, then \(\mathbf{A}\mathbf{u}\) has \(m\) entries for any vector \(\mathbf{u}\) in \(\mathbb{R}^n\); this is why the codomain of transformation is \(\mathbb{R}^m\).
Suppose that \(\mathbf{A}\) has columns \(v_1, v_1, \dots v_n\),. If we multiply \(\mathbf{A}\) by a general vector \(\mathbf{u}\), we get:
This is just a general linear combination of \(v_1, v_1, \dots v_n\). Therefore, the outputs of matrix transformations are exactly the linear combinations of the columns of transformation matrix \(\mathbf{A}\).
Useful identities
Following identities are often used in linear algebra: