We concluded Chapter 2.8 with the understanding that many practical problems in engineering require us to solve systems of linear equations at scale. Matrices and their operations will help us accomplish that goal.
The easiest way to think of a matrix is as being a collection of vectors, written next to each other, in one big array of numbers. Suppose we have three vectors in R2:
We use capital letters such as A and B for matrices. The notation aijā denotes the entry of A in row i, column j, counting from 1. In our original matrix,
Two matrices are equal if they have the same shape and equal entries at every corresponding position. Merely containing the same numbers is not enough.
More generally, an nĆd matrix contains d columns, viewed as vectors in Rn, and n rows, viewed as vectors in Rd.
A subtlety is that these are different objects:
ā£ā”ā2ā13āā¦ā¤āand[2āā1ā3ā].
The first is a 3Ć1 matrix, which we call a vector in R3. The second is a 1Ć3 matrix, which we might call a row vector. In these notes, Rn refers to column vectors. When we discuss the vectors formed by a matrixās rows, we write their entries vertically, as above.
Viewing a matrix as a collection of vectors lets us ask familiar questions:
What is the span of the columns of A? These columns are vectors in R2, so their span is a subset of R2.
Are the rows of A linearly independent? Here we ask whether the two vectors in R3 formed from the rows are linearly independent.
Suppose we survey five Math 124 students about their past week. For each student, we record hours spent studying, practice problems completed, and lectures attended. The following numbers are made up:
Student
Study hours
Practice problems
Lectures attended
Student 1
4
12
2
Student 2
6
18
2
Student 3
3
8
1
Student 4
5
15
2
Student 5
2
6
1
Store the numerical values in a matrix, keeping the row and column order:
With one row per person and one column per feature (or variable), the two views have concrete meanings:
Each of the five rows is a vector in R3: three measurements about one student.
Each of the three columns is a vector in R5: one measurement recorded across all five students. For example, the first column contains everyoneās study hours.
We could instead choose one row per feature and one column per person:
We define subtraction by AāB=A+(ā1)B. The zero matrix0nĆdā has n rows, d columns, and every entry equal to zero; A+0nĆdā=A for any nĆd matrix A.