← Back to Math 010

1.3 Matrices and Matrix Operations: Class Notes

Definitions

A matrix is a rectangular array of numbers. The numbers in the array are called the entries of the matrix. The size of a matrix that has m rows and n columns is m×n (read “m by n”).

#6

Use the following matrices to compute the indicated expression if it is defined.

A=[30−1211], B=[4−102], C=[142315], D=[152−101324], E=[613−112413]

a. (2DT−E)A
b. (4B)C+2B
c. (−AC)T+5DT
d. (BAT−2C)T
e. BT(CCT−ATA)
f. DTET−(ED)T

Definition

If A is any m×n matrix, then the transpose of A, denoted by AT, is defined to be the n×m matrix that results by interchanging the rows and columns of A; that is, the first column of AT is the first row of A, the second column of AT is the second row of A, and so forth.

Solution to #6

a. The rows of D become the columns of DT (row 1 is shown in blue, row 2 in green, row 3 in pink):

DT=[1−13502214]

2DT is scalar multiplication: multiply every entry by 2.

2DT=[2−261004428]

Subtraction (and addition) are performed using corresponding entries:

2DT−E=[2−261004428]−[613−112413]=[−4−3311−12015]

To decide whether a matrix product is defined, use the sizes of the matrices being multiplied. (2DT−E) is a 3×3 matrix and A is a 3×2 matrix. The inner sizes (3 and 3) have to match, and the outer sizes give the size of the result, 3×2.

(2DT−E)3×3 A3×2

Each entry of the product is a row of the first matrix times a column of the second: multiply corresponding entries and add. The entry in row i, column j of the product is row i times column j.

(2DT−E)A=[−4−3311−12015][30−1211]

=[−12+3+30−6+333+1+20−2+20−1+50+2+5]=[−6−336047]

Answer: (2DT−E)A=[−6−336047](3×2)

b. 4B is 2×2 and C is 2×3, so the product (4B)C exists and is 2×3. But 2B is 2×2. Since addition and subtraction are performed on corresponding entries, they can be done only with matrices of the same size. Thus, this sum does not exist.

Answer: Not defined

Relabel the matrices from #6a: let

A=[−4−3311−12015],B=[30−1211]

We found the product AB using the row-column rule.

The row vectors of A (or row matrices) are

r→1=[−4−33],r→2=[11−12],r→3=[015]

The column vectors of B (or column matrices) are

c→1=[3−11],c→2=[021]

AB can also be found using the column method:

AB=[Ac→1Ac→2]

This is a partitioned matrix. Its first column is

Ac→13×3  3×1=[−4−3311−12015][3−11]=[−12+3+333+1+20−1+5]=[−6364](3×1)

and Ac→2 likewise gives column 2 of AB.

We can also use the row method:

AB=[r→1Br→2Br→3B]

For instance,

r→1B=[−4−33][30−1211]=[−12+3+30−6+3]=[−6−3]

which is the first row of AB.

#17

Use the column-row expansion of AB to express this product as a sum of matrix products.

A=[4−32−1], B=[012−231]

Definition

The column-row expansion of AB is AB=𝐜1𝐫1+𝐜2𝐫2+…+𝐜r𝐫r, where 𝐜i are column vectors of A and 𝐫i are row vectors of B.

Solution to #17

Multiply column 1 of A by row 1 of B, and column 2 of A by row 2 of B:

AB=[42][012]+[−3−1][−231]

Each term is (2×1)(1×3): the inner sizes match, so each product is 2×3.

=[048024]+[6−9−32−3−1]=[6−552−13]

Answer: AB=[42][012]+[−3−1][−231]=[6−552−13]

The linear system

a11x1+a12x2+…+a1nxn=b1a21x1+a22x2+…+a2nxn=b2⋮  ⋮am1x1+am2x2+…+amnxn=bm

can be expressed using matrix multiplication.

Definition

When a linear system is written using a matrix product

[a11a12⋯a1na21a22⋯a2n⋮⋮⋮am1am2⋯amn][x1x2⋮xn]=[b1b2⋮bm]

or A𝐱=𝐛, A is called the coefficient matrix of the system.

The coefficients aij of the system are exactly the entries of A. This is a matrix equation.

#13

a. Express the matrix equation as a system of linear equations.

[56−7−1−2304−1][x1x2x3]=[203]

Solution

Multiply out the left-hand side; each row of the coefficient matrix times the column of unknowns gives one entry:

[5x1+6x2−7x3−x1−2x2+3x34x2−x3]=[203]

Two matrices are equal exactly when their corresponding entries are equal (see the definition below), so each pair of matching entries gives one equation:

Answer: 5x1+6x2−7x3=2−x1−2x2+3x3=04x2−x3=3

Definition

Two matrices are defined to be equal if they have the same size and their corresponding entries are equal.

Definition

If A1, A2, …, Ar are matrices of the same size, and if c1, c2, …, cr are scalars, then an expression of the form c1A1+c2A2+…+crAr is called a linear combination of A1, A2, …, Ar with coefficients c1, c2, …, cr.

In #13, we have

A=[56−7−1−2304−1],x→=[x1x2x3],b→=[203]

Note that the left-hand side splits by columns into a linear combination of the columns of A, with the unknowns as coefficients:

[5x1+6x2−7x3−x1−2x2+3x34x2−x3]=[5x1−x10]+[6x2−2x24x2]+[−7x33x3−x3]

=[5−10]x1+[6−24]x2+[−73−1]x3

#22

Example 6 of section 1.2 presents the linear system

x1+3x2−2x3+2x5=02x1+6x2−5x3−2x4+4x5−3x6=05x3+10x4+15x6=02x1+6x2+8x4+4x5+18x6=0

and the reduced row echelon form of its associated augmented matrix as

[1304200001200000000100000000]

Express the solution as a linear combination of column vectors that contain only numerical entries.

Solution

The columns go with x1,…,x6. The leading 1s are in the x1-, x3-, and x6-columns, so solve each nonzero row for its leading variable:

x1=−3x2−4x4−2x5x3=−2x4x6=0

The free variables are x2, x4, and x5. Let r=x2, s=x4, t=x5. Then

x→=[x1x2x3x4x5x6]=[−3r−4s−2tr−2sst0]

Answer: x→=[−310000]r+[−40−2100]s+[−200010]t

Theorem 1.3.1

If A is an m×n matrix, and if 𝐱 is an n×1 column vector, then the product A𝐱 can be expressed as a linear combination of the column vectors of A in which the coefficients are the entries of 𝐱.

See the left-hand side of #13 split into columns, just before #22, and the answer to #22.

Definition

The main diagonal of a square matrix contains entries from the upper left to lower right corners.

Definition

If A is a square matrix, then the trace of A, denoted by tr(A), is defined to be the sum of the entries on the main diagonal of A. The trace of A is undefined if A is not a square matrix.