maths.freeLinear Algebra › 7. Linear Transformations › Linear transformations and change of basis

Linear transformations and change of basis

Matrices as maps, kernel and image, and the same map in different coordinates.

A linear map is determined by what it does to a basis; its matrix changes with the basis by P⁻¹AP. Kernel and image are the map's null space and column space. Picture it: the unit square becoming a parallelogram — the 3D view shows the image of the cube. Think it: similar matrices are the same map seen from different coordinates, which is why eigenvalues are invariants.

Linear Transformations

Early in we prefaced the definition of a vector space with the comment that it was one of the two most important definitions in the entire course. Here comes the other. Any capsule summary of linear algebra would have to describe the subject as the interplay of linear transformations and vector spaces. Here we go.

  1. \ltdefn{T}{\complex{3}}{\complex{2}},\quad \lt{T}{\colvector{x_1\\x_2\\x_3}}=\colvector{3x_1-x_2+x_3\\8x_2-6}
  2. \ltdefn{S}{\complex{2}}{\complex{3}},\quad \lt{S}{\colvector{x_1\\x_2}}=\colvector{3x_1+5x_2\\8x_1-3x_2\\-4x_1}

established three properties of matrix similarity that are collectively known as the defining properties of an equivalence relation. Exercises T30 and T31 extend this idea to linear transformations.

Linear Transformations

The two defining conditions in the definition of a linear transformation should feel linear, whatever that means. Conversely, these two conditions could be taken as exactly what it means to be linear. As every vector space property derives from vector addition and scalar multiplication, so too, every property of a linear transformation derives from these two defining properties. While these conditions may be reminiscent of how we test subspaces, they really are quite different, so do not confuse the two.

Here are two diagrams that convey the essence of the two defining properties of a linear transformation. In each case, begin in the upper left-hand corner, and follow the arrows around the rectangle to the lower-right hand corner, taking two different routes and doing the indicated operations labeled on the arrows. There are two results there. For a linear transformation these two expressions are always equal. Definition of Linear Transformation, Additive \matrix (m) [matrix of math nodes, row sep=5em, column sep=10em, text height=1.5ex, text depth=0.25ex] { \vect{u}_1,\,\vect{u}_2 & T(\vect{u}_1),\,T(\vect{u}_2) \\ \vect{u}_1+\vect{u}_2 & T(\vect{u}_1+\vect{u}_2)=T(\vect{u}_1)+T(\vect{u}_2)\\}; \path[->] (m-1-1) edge[thick] node[auto] {$T$} (m-1-2) (m-1-2) edge[thick] node[auto] {$+$} (m-2-2) (m-1-1) edge[thick] node[auto] {$+$} (m-2-1) (m-2-1) edge[thick] node[auto] {$T$} (m-2-2); Definition of Linear Transformation, Multiplicative \matrix (m) [matrix of math nodes, row sep=5em, column sep=10em, text height=1.5ex, text depth=0.25ex] { \vect{u} & \lt{T}{\vect{u}} \\ \alpha\vect{u} & \lt{T}{\alpha\vect{u}}=\alpha\lt{T}{\vect{u}}\\}; \path[->] (m-1-1) edge[thick] node[auto] {$T$} (m-1-2) (m-1-2) edge[thick] node[auto] {$\alpha$} (m-2-2) (m-1-1) edge[thick] node[auto] {$\alpha$} (m-2-1) (m-2-1) edge[thick] node[auto] {$T$} (m-2-2);

Let us examine several examples and begin to form a catalog of known linear transformations to work with.

It can be just as instructive to look at functions that are not linear transformations. Since the defining conditions must be true for all vectors and scalars, it is enough to find just one situation where the properties fail.

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

Linear Transformation Cartoons

Throughout this chapter, and , we will include drawings of linear transformations. We will call them cartoons, not because they are humorous, but because they will only expose a portion of the truth. A Bugs Bunny cartoon might give us some insights on human nature, but the rules of physics and biology are routinely (and grossly) violated. So it will be with our linear transformation cartoons. Here is our first, followed by a guide to help you understand how these are meant to describe fundamental truths about linear transformations, while simultaneously violating other truths. General Linear Transformation \tikzset{ltvect/.style={shape=circle, minimum size=0.30em, inner sep=0pt, draw, fill=black}} \tikzset{ltedge/.style={->, bend left=20, thick, shorten <=0.1em, shorten >=0.1em}} \draw ( 5em, 8em) circle [x radius=5em, y radius=8em, thick]; \draw (20em, 8em) circle [x radius=5em, y radius=8em, thick]; \node (U) at ( 5em, -1em) {$U$}; \node (V) at (20em, -1em) {$V$}; \draw[->, thick, draw] (U) to node[auto] {$T$} (V); \node (w) [ltvect, label=left:$\vect{w}$] at (5em, 13em) {}; \node (u) [ltvect, label=left:$\vect{u}$] at (5em, 11em) {}; \node (zeroU) [ltvect, label=left:$\zerovector_U$] at (5em, 8em) {}; \node (x) [ltvect, label=left:$\vect{x}$] at (5em, 5em) {}; \node (v) [ltvect, label=right:$\vect{v}$] at (20em, 12em) {}; \node (zeroV) [ltvect, label=right:$\zerovector_V$] at (20em, 8em) {}; \node (y) [ltvect, label=right:$\vect{y}$] at (20em, 5em) {}; \node (t) [ltvect, label=right:$\vect{t}$] at (20em, 3em) {}; \draw[ltedge] (u) to (v); \draw[ltedge] (w) to (v); \draw[ltedge] (zeroU) to (zeroV); \draw[ltedge] (x) to (y);

Here we picture a linear transformation $\ltdefn{T}{U}{V}$, where this information will be consistently displayed along the bottom edge. The ovals are meant to represent the vector spaces, in this case $U$, the domain, on the left and $V$, the codomain, on the right. Of course, vector spaces are typically infinite sets, so you will have to imagine that characteristic of these sets. A small dot inside of an oval will represent a vector within that vector space, sometimes with a name, sometimes not (in this case every vector has a name). The sizes of the ovals are meant to be proportional to the dimensions of the vector spaces. However, when we make no assumptions about the dimensions, we will draw the ovals as the same size, as we have done here (which is not meant to suggest that the dimensions have to be equal).

These cartoons are of course no substitute for careful definitions and proofs, but they can be a handy way to think about the various properties we will be studying.

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

Matrices and Linear Transformations

If you give me a matrix, then I can quickly build you a linear transformation. Always. First a motivating example and then the theorem.

Example: Linear transformation from a matrix

Let A= \begin{bmatrix} 3&-1&8&1\\ 2&0&5&-2\\ 1&1&3&-7 \end{bmatrix} and define a function $\ltdefn{P}{\complex{4}}{\complex{3}}$ by \lt{P}{\vect{x}}=A\vect{x}

So we are using an old friend, the matrix-vector product () as a way to convert a vector with 4 components into a vector with 3 components. Applying allows us to write the defining formula for $P$ in a slightly different form, \lt{P}{\vect{x}}=A\vect{x}= \begin{bmatrix} 3&-1&8&1\\ 2&0&5&-2\\ 1&1&3&-7 \end{bmatrix} \colvector{x_1\\x_2\\x_3\\x_4} = x_1\colvector{3\\2\\1}+ x_2\colvector{-1\\0\\1}+ x_3\colvector{8\\5\\3}+ x_4\colvector{1\\-2\\-7}

So we recognize the action of the function $P$ as using the components of the vector ($x_1,\,x_2,\,x_3,\,x_4$) as scalars to form the output of $P$ as a linear combination of the four columns of the matrix $A$, which are all members of $\complex{3}$, so the result is a vector in $\complex{3}$. We can rearrange this expression further, using our definitions of operations in $\complex{3}$ (). \lt{P}{\vect{x}} &=A\vect{x}&&\text{Definition of $P$}\\ &= x_1\colvector{3\\2\\1}+ x_2\colvector{-1\\0\\1}+ x_3\colvector{8\\5\\3}+ x_4\colvector{1\\-2\\-7}&&\\ &= \colvector{3x_1\\2x_1\\x_1}+ \colvector{-x_2\\0\\x_2}+ \colvector{8x_3\\5x_3\\3x_3}+ \colvector{x_4\\-2x_4\\-7x_4}&&\\ &=\colvector{3x_1-x_2+8x_3+x_4\\2x_1+5x_3-2x_4\\x_1+x_2+3x_3-7x_4}&&

You might recognize this final expression as being similar in style to some previous examples () and some linear transformations defined in the archetypes ( through ). But the expression that says the output of this linear transformation is a linear combination of the columns of $A$ is probably the most powerful way of thinking about examples of this type.

Almost forgot we should verify that $P$ is indeed a linear transformation. This is easy with two matrix properties from . \lt{P}{\vect{x}+\vect{y}} &=A\left(\vect{x}+\vect{y}\right)&&\text{Definition of $P$}\\ &=A\vect{x}+A\vect{y}&&\\ &=\lt{P}{\vect{x}}+\lt{P}{\vect{y}}&&\text{Definition of $P$} and \lt{P}{\alpha\vect{x}} &=A\left(\alpha\vect{x}\right)&&\text{Definition of $P$}\\ &=\alpha\left(A\vect{x}\right)&&\\ &=\alpha\lt{P}{\vect{x}}&&\text{Definition of $P$}

So by , $P$ is a linear transformation.

We can turn around. You give me a linear transformation and I will give you a matrix.

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

Linear Transformations and Linear Combinations

It is the interaction between linear transformations and linear combinations that lies at the heart of many of the important theorems of linear algebra. The next theorem distills the essence of this. The proof is not deep, the result is hardly startling, but it will be referenced frequently. We have already passed by one occasion to employ it, in the proof of . Paraphrasing, this theorem says that we can push linear transformations down into linear combinations, or pull linear transformations up out of linear combinations. We will have opportunities to both push and pull.

Some authors, especially in more advanced texts, take the conclusion of as the defining condition of a linear transformation. This has the appeal of being a single condition, rather than the two-part condition of . (See ).

Our next theorem says, informally, that it is enough to know how a linear transformation behaves for inputs from any basis of the domain, and all the other outputs are described by a linear combination of these few values. Again, the statement of the theorem, and its proof, are not remarkable, but the insight that goes along with it is very fundamental.

You might recall facts from analytic geometry, such as any two points determine a line and any three non-collinear points determine a parabola. has much of the same feel. By specifying the $n$ outputs for inputs from a basis, an entire linear transformation is determined. The analogy is not perfect, but the style of these facts are not very dissimilar from .

Notice that the statement of asserts the existence of a linear transformation with certain properties, while the proof shows us exactly how to define the desired linear transformation. The next two examples show how to compute values of linear transformations that we create this way.

Here is a third example of a linear transformation defined by its action on a basis, only with more abstract vector spaces involved.

Informally, we can describe by saying it is enough to know what a linear transformation does to a basis (of the domain).

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

Pre-Images

The definition of a function requires that for each input in the domain there is exactly one output in the codomain. However, the correspondence does not have to behave the other way around. An output from the codomain could have many different inputs from the domain which the transformation sends to that output, or there could be no inputs at all which the transformation sends to that output. To formalize our discussion of this aspect of linear transformations, we define the pre-image.

In other words, $\preimage{T}{\vect{v}}$ is the set of all those vectors in the domain $U$ that get sent to the vector $\vect{v}$.

The preimage is just a set, it is almost never a subspace of $U$ (you might think about just when $\preimage{T}{\vect{v}}$ is a subspace, see ). We will describe its properties going forward, and it will be central to the main ideas of this chapter.

Pre-Images

Sage handles pre-images just a bit differently than our approach in the text. For the moment, we can obtain a single vector in the set that is the pre-image via the .preimage_representative() method. Understand that this method will return just one element of the pre-image set, and we have no real control over which one. Also, it is certainly possible that a pre-image is the empty set in this case, the method will raise a ValueError. We will use our running example to illustrate.

Remember, we have defined the pre-image as a set, and Sage just gives us a single element of the set. We will see in that the upcoming explains why this is no great shortcoming in Sage.

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

New Linear Transformations From Old

We can combine linear transformations in natural ways to create new linear transformations. So we will define these combinations and then prove that the results really are still linear transformations. First the sum of two linear transformations.

Notice that the first plus sign in the definition is the operation being defined, while the second one is the vector addition in $V$. (Vector addition in $U$ will appear just now in the proof that $T+S$ is a linear transformation.) only provides a function. It would be nice to know that when the constituents ($T$, $S$) are linear transformations, then so too is $T+S$.

Example: Sum of two linear transformations

Suppose that $\ltdefn{T}{\complex{2}}{\complex{3}}$ and $\ltdefn{S}{\complex{2}}{\complex{3}}$ are defined by \lt{T}{\colvector{x_1\\x_2}}=\colvector{x_1+2x_2\\3x_1-4x_2\\5x_1+2x_2} && \lt{S}{\colvector{x_1\\x_2}}=\colvector{4x_1-x_2\\x_1+3x_2\\-7x_1+5x_2}

Then by , we have \lt{(T+S)}{\colvector{x_1\\x_2}}&=\lt{T}{\colvector{x_1\\x_2}}+\lt{S}{\colvector{x_1\\x_2}}\\ &=\colvector{x_1+2x_2\\3x_1-4x_2\\5x_1+2x_2}+\colvector{4x_1-x_2\\x_1+3x_2\\-7x_1+5x_2} =\colvector{5x_1+x_2\\4x_1-x_2\\-2x_1+7x_2} and by we know $T+S$ is also a linear transformation from $\complex{2}$ to $\complex{3}$.

Given that $T$ is a linear transformation, it would be nice to know that $\alpha T$ is also a linear transformation.

Condensed — the full section is in Beezer, A First Course in Linear Algebra.

Beispiel: [[0,-1],[1,0]] * [[1],[0]]

[[0,-1],[1,0]] * [[1],[0]]

\left[\begin{matrix}0 & -1\\1 & 0\end{matrix}\right] \left[\begin{matrix}1\\0\end{matrix}\right]

Schritt für Schritt

  1. \left[\begin{matrix}0 & -1\\1 & 0\end{matrix}\right] \left[\begin{matrix}1\\0\end{matrix}\right]

    A 2×2 times a 2×1 gives a 2×1 matrix. Entry (i, j) is row i of A dotted with column j of B.

  2. c_{11} = (0)(1) + (-1)(0) = 0

  3. c_{21} = (1)(1) + (0)(0) = 1

  4. AB = \left[\begin{matrix}0\\1\end{matrix}\right]

Die Antwort aufzeigen
AB = \left[\begin{matrix}0\\1\end{matrix}\right]

Symbols used here

A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}
matrix
A rectangular array of numbers; a linear map.
x \in A,\ A \subseteq B
element of, subset
x belongs to A; every element of A is in B.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
\mathbf{v},\ \vec{v}
vector
A quantity with magnitude and direction; a column of numbers.
\det A,\ |A|
determinant
Scaling factor of area/volume under A; zero means singular.
A^{-1},\ A^{T}
inverse, transpose
The matrix that undoes A; A with rows and columns swapped.
\lambda
lambda (eigenvalue)
The factor by which an eigenvector is stretched: Av = λv.
\mathbf{u} \cdot \mathbf{v},\ \|\mathbf{v}\|
dot product, norm
Σ u_i v_i; the length of v, √(v·v).

How to: Linear transformations and change of basis

  1. A 2×2 times a 2×1 gives a 2×1 matrix. Entry (i, j) is row i of A dotted with column j of B.

Questions people ask

What does a determinant mean geometrically?

It is the factor by which the matrix scales area (2×2) or volume (3×3), with a negative sign if orientation flips. Zero means the matrix flattens space and cannot be undone.

What is an eigenvector?

A direction the matrix does not turn — it only stretches it by the eigenvalue. Along eigenvectors a complicated matrix acts like multiplication by a number.

Why is matrix multiplication not commutative?

Because a matrix is a transformation and AB means "do B, then A". Rotating then reflecting is not the same as reflecting then rotating.

Versuch es selbst.

Parts of this page are adapted from Beezer, A First Course in Linear Algebra (GFDL 1.2). Condensed and re-explained here; errors are ours.

Mehr in Linear Algebra