Jaysen Tsao
Linear Algebra ›

Introduction to Matrices

Matrix Representations of Linear Maps

A matrix is a rectangular array of scalars arranged in rows and columns. Matrices can be used to represent linear maps between finite-dimensional vector spaces.

A matrix with 𝑚 rows and 𝑛 columns with elements from a field 𝐹 is called an 𝑚×𝑛 matrix over 𝐹.

Notation: Sets of Matrices

There are various ways to denote the set of all 𝑚×𝑛 matrices over 𝐹, most commonly:

ℳ𝑚×𝑛(𝐹),𝐹𝑚×𝑛.

If 𝐴 is a matrix, then 𝑎𝑖𝑗 denotes the element in the 𝑖th row and 𝑗th column of 𝐴:

𝐴=(𝑎11𝑎12⋯𝑎1𝑛𝑎21𝑎22⋯𝑎2𝑛⋮⋮⋱⋮𝑎𝑚1𝑎𝑚2⋯𝑎𝑚𝑛).

Notation: Column and Row Vectors

A column vector represents a vector in 𝐹𝑚 as an 𝑚×1 matrix, and a row vector represents a vector in 𝐹𝑛 as a 1×𝑛 matrix.

Example.
The vector 𝐯=(1,2,3)∈ℝ3 can be represented as the column vector (123) or the row vector (123).

Despite the abstract notion of linear maps, by choosing bases for the domain and codomain vector spaces, we can represent linear maps concretely as matrices in familiar fields like ℝ and ℂ.

Definition 33: Standard Matrix of a Linear Map

Let 𝑉 and 𝑊 be finite-dimensional vector spaces over the same field 𝐹, and let 𝑇:𝑉→𝑊 be a linear map. Let ℬ={𝐛1,𝐛2,⋯,𝐛𝑛} be an ordered basis for 𝑉, and let 𝒞={𝐜1,𝐜2,⋯,𝐜𝑚} be an ordered basis for 𝑊.

The standard matrix of 𝑇 with respect to the bases ℬ and 𝒞, denoted [𝑇]𝒞ℬ, is the 𝑚×𝑛 matrix whose 𝑖th column is the coordinate vector of 𝑇(𝐛𝑖) with respect to the basis 𝒞, where 𝐛𝑖 is the 𝑖th basis vector in ℬ:

[𝑇]𝒞ℬ=(|||[𝑇(𝐛1)]𝒞[𝑇(𝐛2)]𝒞⋯[𝑇(𝐛𝑛)]𝒞|||).

Corollary 15: Dimension of a Standard Matrix

Let 𝑇:𝑉→𝑊 be a linear map between finite-dimensional vector spaces. If dim(𝑉)=𝑛 and dim(𝑊)=𝑚, then any standard matrix for 𝑇 is an 𝑚×𝑛 matrix.

Example.

Let ℙ3(ℝ) be the real vector space of all polynomials of degree at most 3 over the indeterminate 𝑥 with real coefficients. Also, consider the standard polynomial basis ℬ={1,𝑥,𝑥2,𝑥3} for ℙ3(ℝ).

Recall that differentiation is a linear map, so define 𝐷:ℙ3(ℝ)→ℙ3(ℝ) by 𝐷(𝑓)= d𝑓/ d𝑥. The standard matrix of 𝐷 with respect to the standard polynomial basis ℬ is the 4×4 matrix:

[𝐷]ℬℬ=(||||[𝐷(1)]ℬ[𝐷(𝑥)]ℬ[𝐷(𝑥2)]ℬ[𝐷(𝑥3)]ℬ||||)=(||||[0]ℬ[1]ℬ[2𝑥]ℬ[3𝑥2]ℬ||||)=(0100002000030000).
Example.

Let 𝑇:ℝ2→ℝ3 be a linear map defined by 𝑇(𝑥,𝑦)=(𝑥,3𝑥+𝑦,𝑥−2𝑦). The standard matrix of 𝑇 with respect to the standard bases for ℝ2 and ℝ3 (ℰ2 and ℰ3 respectively) is the 3×2 matrix:

[𝑇]ℰ3ℰ2=(||[𝑇(𝐞1)]ℰ3[𝑇(𝐞2)]ℰ3||)=(||𝑇(𝐞1)𝑇(𝐞2)||) because [𝐯]ℰ=𝐯=(||𝑇(1,0)𝑇(0,1)||)=(10311−2).

In general, if 𝑇:𝑉→𝐹𝑚 is a linear map, we can use the standard basis ℰ𝑚 for 𝐹𝑚 to construct a standard matrix for 𝑇 without needing to compute coordinate vectors. Since [𝐯]ℰ𝑚=𝐯 for all 𝐯∈𝐹𝑚:

[𝑇]ℰ𝑚ℬ=(|||𝑇(𝐛1)𝑇(𝐛2)⋯𝑇(𝐛𝑛)|||) where ℬ={𝐛1,𝐛2,⋯,𝐛𝑛} is a basis for 𝑉.

Furthermore, if 𝑉=𝐹𝑛, we can use the standard basis ℰ𝑛 for 𝐹𝑛 to construct a standard matrix for 𝑇 based on only the standard basis vectors 𝐞1,𝐞2,…,𝐞𝑛:

[𝑇]ℰ𝑚ℰ𝑛=(|||𝑇(𝐞1)𝑇(𝐞2)⋯𝑇(𝐞𝑛)|||) where ℰ𝑛={𝐞1,𝐞2,⋯,𝐞𝑛}.

This specific standard matrix of 𝑇 is often simply called the standard matrix or coordinate matrix of 𝑇, denoted [𝑇].

Corollary 16: Standard Matrix of a Linear Map from 𝐹𝑛 to 𝐹𝑚

Let 𝑇:𝐹𝑛→𝐹𝑚 be a linear map. Then the standard matrix of 𝑇, denoted [𝑇], with respect to the standard bases for 𝐹𝑛 and 𝐹𝑚 (ℰ𝑛 and ℰ𝑚 respectively) is the 𝑚×𝑛 matrix whose 𝑖th column is the image of 𝐞𝑖∈𝐹𝑛 under 𝑇. That is,

[𝑇]=[𝑇]ℰ𝑚ℰ𝑛=(|||𝑇(𝐞1)𝑇(𝐞2)⋯𝑇(𝐞𝑛)|||).

Now suppose 𝐯∈𝑉 and 𝑇:𝑉→𝑊 is a linear map. Also let ℬ and 𝒞 be bases for 𝑉 and 𝑊 respectively.

Definition 34: Matrix-Vector Product

Suppose 𝐴∈𝐹𝑚×𝑛 has columns 𝐚1,𝐚2,…,𝐚𝑛∈𝐹𝑚, and let 𝐱=(𝑥1,𝑥2,…,𝑥𝑛)∈𝐹𝑛 be a column vector. That is:

𝐴=(|||𝐚1𝐚2⋯𝐚𝑛|||),𝐱=(𝑥1⋮𝑥𝑛).

The matrix-vector product of 𝐴 and 𝐱, denoted 𝐴𝐱, is the vector in 𝐹𝑚 defined by:

𝐴𝐱=𝑥1𝐚1+𝑥2𝐚2+⋯+𝑥𝑛𝐚𝑛.

In other words, 𝐴𝐱 is the linear combination of the columns of 𝐴 whose weights are given by the entries of 𝐱.

Example.

Let 𝐴=(1234) and 𝐱=(56). Then the matrix-vector product of 𝐴 and 𝐱 is:

𝐴𝐱=5(13)+6(24)=(1739).

Theorem 35: Fundamental Property of the Matrix-Vector Product

The matrix-vector product of the standard matrix [𝑇]𝒞ℬ of 𝑇 with respect to the bases ℬ and 𝒞 and the coordinate vector [𝐯]ℬ of 𝐯 with respect to the basis ℬ is:

[𝑇]𝒞ℬ[𝐯]ℬ=[𝑇(𝐯)]𝒞.
Proof: Theorem 35.

Suppose 𝑇:𝑉→𝑊 is a linear map. Let ℬ={𝐛1,𝐛2,⋯,𝐛𝑛} be an ordered basis for 𝑉, and let 𝒞={𝐜1,𝐜2,⋯,𝐜𝑚} be an ordered basis for 𝑊. Let 𝐯∈𝑉 be a vector with ℬ-coordinates [𝐯]ℬ=(𝑥1,𝑥2,…,𝑥𝑛), such that 𝐯=𝑥1𝐛1+𝑥2𝐛2+⋯+𝑥𝑛𝐛𝑛. Then:

[𝑇]𝒞ℬ[𝐯]ℬ=(||[𝑇(𝐛1)]𝒞⋯[𝑇(𝐛𝑛)]𝒞||)(𝑥1⋮𝑥𝑛)=𝑥1[𝑇(𝐛1)]𝒞+𝑥2[𝑇(𝐛2)]𝒞+⋯+𝑥𝑛[𝑇(𝐛𝑛)]𝒞 by Definition 34=[𝑥1𝑇(𝐛1)+𝑥2𝑇(𝐛2)+⋯+𝑥𝑛𝑇(𝐛𝑛)]𝒞 by 

Theorem 29

=[𝑇(𝑥1𝐛1+𝑥2𝐛2+⋯+𝑥𝑛𝐛𝑛)]𝒞 because 𝑇 is linear =[𝑇(𝐯)]𝒞 by substitution of 𝐯,

as desired. ∎

Definition 35: Identity Matrix

The 𝒏×𝒏 identity matrix, written 𝐼𝑛, is the 𝑛×𝑛 standard matrix of the identity map id𝐹𝑛 with respect to the standard basis ℰ𝑛={𝐞1,𝐞2,…,𝐞𝑛}:

𝐼𝑛=[id𝐹𝑛]ℰ𝑛ℰ𝑛=(|||𝐞1𝐞2⋯𝐞𝑛|||)=(10⋯001⋯0⋮⋮⋱⋮00⋯1).

Corollary 17

Let 𝐴∈𝐹𝑚×𝑛. Then 𝐼𝑚𝐴=𝐴𝐼𝑛=𝐴.

Corollary 18

Let 𝐯∈𝐹𝑛. Then 𝐼𝑛𝐯=𝐯.

Definition 36: Standard Transformation of a Matrix

The standard transformation of a matrix 𝐴∈𝐹𝑚×𝑛 is the linear map 𝑇𝐴:𝐹𝑛→𝐹𝑚 defined by:

𝑇𝐴(𝐱)=𝐴𝐱 for all 𝐱∈𝐹𝑛.

Proposition 7

Let 𝐴∈𝐹𝑚×𝑛 be a matrix and let 𝑇𝐴:𝐹𝑛→𝐹𝑚 be the standard transformation of 𝐴. Then the standard matrix of 𝑇𝐴 with respect to the standard bases for 𝐹𝑛 and 𝐹𝑚 is 𝐴, i.e. [𝑇𝐴]=𝐴.

Operations on Matrices

Definition 37: Matrix Multiplication

Let 𝐴∈𝐹𝑚×𝑝 and 𝐵∈𝐹𝑝×𝑛 be matrices. The matrix product of 𝐴 and 𝐵, denoted 𝐴𝐵, is the 𝑚×𝑛 matrix whose 𝑖th column is the matrix-vector product of 𝐴 and the 𝑖th column of 𝐵:

𝐴𝐵=𝐴(𝐛1𝐛2⋯𝐛𝑛)=(𝐴𝐛1𝐴𝐛2⋯𝐴𝐛𝑛).

Theorem 36: Fundamental Property of Matrix Multiplication

Let 𝑈,𝑉,𝑊 be finite-dimensional vector spaces over a field 𝐹, and let 𝑆:𝑉→𝑊 and 𝑇:𝑈→𝑉 be linear maps. Let ℬ, 𝒞, and 𝒟 be ordered bases for 𝑈, 𝑉, and 𝑊 respectively. Then:

[𝑆]𝒟𝒞[𝑇]𝒞ℬ=[𝑆∘𝑇]𝒟ℬ.
Proof: Theorem 36.

Let 𝑆:𝑉→𝑊 and 𝑇:𝑈→𝑉 be linear maps between finite-dimensional vector spaces, and let ℬ={𝐛1,…,𝐛𝑛}, 𝒞, and 𝒟 be ordered bases for 𝑈, 𝑉, and 𝑊 respectively. Then:

[𝑆]𝒟𝒞[𝑇]𝒞ℬ=[𝑆]𝒟𝒞(||[𝑇(𝐛1)]𝒞⋯[𝑇(𝐛𝑛)]𝒞||) by Definition 33=(||[𝑆]𝒟𝒞[𝑇(𝐛1)]𝒞⋯[𝑆]𝒟𝒞[𝑇(𝐛𝑛)]𝒞||) by Definition 37=(||[𝑆(𝑇(𝐛1))]𝒟⋯[𝑆(𝑇(𝐛𝑛))]𝒟||) by Theorem 35=(||[(𝑆∘𝑇)(𝐛1)]𝒟⋯[(𝑆∘𝑇)(𝐛𝑛)]𝒟||) by definition of function composition =[𝑆∘𝑇]𝒟ℬ by Definition 33,

as desired. ∎

Theorem 37: Alternative Formula for Matrix Multiplication

Let 𝐴∈𝐹𝑚×𝑝 and 𝐵∈𝐹𝑝×𝑛 be matrices. Denote 𝐚𝑖∈𝐹𝑝 as the 𝑖th row of 𝐴 and 𝐛𝑗∈𝐹𝑝 as the 𝑗th column of 𝐵.

Define a function

1 𝑓:𝐹𝑝×𝐹𝑝→𝐹 by 𝑓((𝑥1,…,𝑥𝑝),(𝑦1,…,𝑦𝑝))=∑𝑘=1𝑝𝑥𝑘𝑦𝑘. Then the (𝑖,𝑗)th entry of the matrix product 𝐴𝐵 is 𝑓(𝐚𝑖,𝐛𝑗):

(―𝐚1――𝐚2―⋮―𝐚𝑚―)(|||𝐛1𝐛2⋯𝐛𝑛|||)=(𝑓(𝐚1,𝐛1)𝑓(𝐚1,𝐛2)⋯𝑓(𝐚1,𝐛𝑛)𝑓(𝐚2,𝐛1)𝑓(𝐚2,𝐛2)⋯𝑓(𝐚2,𝐛𝑛)⋮⋮⋱⋮𝑓(𝐚𝑚,𝐛1)𝑓(𝐚𝑚,𝐛2)⋯𝑓(𝐚𝑚,𝐛𝑛)).

Definition 38: Transpose of a Matrix

Let 𝐴∈𝐹𝑚×𝑛 be a matrix. The transpose of 𝐴, denoted 𝐴𝖳, is the 𝑛×𝑚 matrix obtained by interchanging the rows and columns of 𝐴:

𝐴𝖳=(𝑎11𝑎21⋯𝑎𝑚1𝑎12𝑎22⋯𝑎𝑚2⋮⋮⋱⋮𝑎1𝑛𝑎2𝑛⋯𝑎𝑚𝑛).
Example.

The transpose of a 2×3 matrix is a 3×2 matrix:

(123456)𝖳=(142536).

Definition 39: Matrix Addition and Scalar Multiplication

Let 𝐴,𝐵∈𝐹𝑚×𝑛 be matrices. The matrix addition of 𝐴 and 𝐵, denoted 𝐴+𝐵, is the 𝑚×𝑛 matrix obtained by adding corresponding entries of 𝐴 and 𝐵:

𝐴+𝐵=(𝑎11+𝑏11𝑎12+𝑏12⋯𝑎1𝑛+𝑏1𝑛𝑎21+𝑏21𝑎22+𝑏22⋯𝑎2𝑛+𝑏2𝑛⋮⋮⋱⋮𝑎𝑚1+𝑏𝑚1𝑎𝑚2+𝑏𝑚2⋯𝑎𝑚𝑛+𝑏𝑚𝑛).

Let 𝑐∈𝐹 be a scalar. The scalar multiplication of 𝐴 by 𝑐, denoted 𝑐𝐴, is the matrix obtained by multiplying each entry of 𝐴 by the scalar 𝑐:

𝑐𝐴=(𝑐⋅𝑎11𝑐⋅𝑎12⋯𝑐⋅𝑎1𝑛𝑐⋅𝑎21𝑐⋅𝑎22⋯𝑐⋅𝑎2𝑛⋮⋮⋱⋮𝑐⋅𝑎𝑚1𝑐⋅𝑎𝑚2⋯𝑐⋅𝑎𝑚𝑛).

Theorem 38: 𝐹𝑚×𝑛 is a Vector Space

𝐹𝑚×𝑛, the set of all 𝑚×𝑛 matrices over the field 𝐹, is an 𝑚𝑛-dimensional vector space over 𝐹 under the matrix addition and scalar multiplication as defined in Definition 39.

Proof: Theorem 38.

Suppose 𝐹 is an arbitrary field, and 𝑚,𝑛∈ℤ+.

Lemma 1: 𝐹𝑚×𝑛 is a vector space over 𝐹.
Lemma 2: dim(𝐹𝑚×𝑛)=𝑚𝑛.

Thus, 𝐹𝑚×𝑛 is an 𝑚𝑛-dimensional vector space over 𝐹.

Subspaces Defined by Matrices

Definition 40: Column Space of a Matrix

Let 𝐴 be an 𝑚×𝑛 matrix over a field 𝐹. The column space of 𝐴, denoted col(𝐴), is the subspace of 𝐹𝑚 spanned by the columns of 𝐴:

col(|||𝐚1𝐚2⋯𝐚𝑛|||)=span{𝐚1,𝐚2,…,𝐚𝑛}.

Definition 41: Row Space of a Matrix

Let 𝐴 be an 𝑚×𝑛 matrix over a field 𝐹. The row space of 𝐴, denoted row(𝐴), is the subspace of 𝐹𝑛 spanned by the rows of 𝐴:

row(―𝐚1――𝐚2―⋮―𝐚𝑚―)=span{𝐚1,𝐚2,…,𝐚𝑚}.

Important

Suppose 𝐴∈𝐹𝑚×𝑛. Then col(𝐴) is a subspace of 𝐹𝑚 and row(𝐴) is a subspace of 𝐹𝑛.

Corollary 19

col(𝐴)=row(𝐴𝖳), and row(𝐴)=col(𝐴𝖳).

Corollary 20

col(𝐴)=im(𝑇𝐴), where 𝑇𝐴:𝐹𝑛→𝐹𝑚 is defined by 𝐱↦𝐴𝐱.

Definition 42: Null Space of a Matrix

Let 𝐴 be an 𝑚×𝑛 matrix over a field 𝐹. The null space of 𝐴, denoted nul(𝐴), is the subspace of 𝐹𝑛 defined by:

nul(𝐴)={𝐱∈𝐹𝑛|𝐴𝐱=𝟎}.

Important

Suppose 𝐴∈𝐹𝑚×𝑛. Then nul(𝐴) is a subspace of 𝐹𝑛.

Corollary 21

nul(𝐴)=ker(𝑇𝐴), where 𝑇𝐴:𝐹𝑛→𝐹𝑚 is defined by 𝐱↦𝐴𝐱.

Definition 43: Rank and Nullity of a Matrix

Let 𝐴 be an 𝑚×𝑛 matrix over a field 𝐹. The rank of 𝐴, denoted rank(𝐴), is the dimension of the column space of 𝐴:

rank(𝐴)=dim(col(𝐴)).

The nullity of 𝐴, denoted nullity(𝐴), is the dimension of the null space of 𝐴:

nullity(𝐴)=dim(nul(𝐴)).

Corollary 22

dim(col(𝐴))=dim(row(𝐴))=rank(𝐴).

Theorem 39: Rank-Nullity Theorem for Matrices

Let 𝐴 be an 𝑚×𝑛 matrix over a field 𝐹. Then:

rank(𝐴)+nullity(𝐴)=𝑛.

Exercises

Exercise 62.

Let 𝐴∈𝐹𝑚×𝑘 and 𝐵∈𝐹𝑘×𝑛. Show that:

rank(𝐴𝐵)≤min(rank(𝐴),rank(𝐵)).
Exercise 63.
Suppose 𝐴,𝐵∈𝐹𝑛×𝑛 with 𝐴2=𝐵2 and 𝐴3=𝐵3. Prove or disprove that necessarily 𝐴=𝐵.
Exercise 64.
Suppose 𝑉 and 𝑊 are finite-dimensional nontrivial vector spaces, and 𝑇:𝑉→𝑊 is a linear map. Show that rank(𝑇)=1 if and only if there exists a basis ℬ for 𝑉 and a basis 𝒞 for 𝑊 such that all entries of [𝑇]𝒞ℬ equal 1.
Exercise 65.

Let ℙ𝑛(ℝ) denote the vector space of all polynomials of degree at most 𝑛 over the indeterminate 𝑥 with real coefficients. Let ℬ𝑛={1,𝑥,𝑥2,…,𝑥𝑛} be the standard polynomial basis for ℙ𝑛(ℝ).

Define the integration map 𝐽:ℙ3(ℝ)→ℙ4(ℝ) on polynomials of at most degree 3 by:

𝐽(𝑓)=∫0𝑥𝑓(𝑡) d𝑡.

Show that 𝐽 is a linear map and find [𝐽]ℬ4ℬ3, the 5×4 standard matrix of 𝐽 with respect to the standard polynomial bases for ℙ3(ℝ) and ℙ4(ℝ).

  1. 1This is the dot product, which is redefined later