Introduction to Matrices
Meet the rectangular arrays that organize and transform data
Open any spreadsheet, and you will see rows and columns of numbers staring back at you. A budget with expenses listed by month. A gradebook with students in rows and assignments in columns. A table showing the distances between cities. These rectangular arrangements of data are so natural that you probably never stopped to think about them as mathematical objects. But they are, and they have a name: matrices.
Matrices (the plural of “matrix”) are everywhere in modern life, even when you do not see them. When your phone camera sharpens a photo, it is using matrices. When Netflix recommends a movie, matrices are involved. When engineers design a bridge or simulate an airplane wing, they fill massive matrices with numbers and ask computers to crunch them. The seemingly simple idea of arranging numbers in a rectangle turns out to be one of the most powerful tools in all of applied mathematics.
In this lesson, you will learn what matrices are, how to describe them precisely, and how to perform basic operations on them. Think of this as learning the alphabet of linear algebra. Once you know these fundamentals, you will be ready to combine them into the powerful techniques that make matrices so useful.
Core Concepts
What Is a Matrix?
A matrix is a rectangular array of numbers arranged in rows (horizontal) and columns (vertical). The numbers inside are called entries or elements of the matrix.
Here is a simple example:
$$A = \begin{pmatrix} 1 & 2 & 3 \ 4 & 5 & 6 \end{pmatrix}$$
This matrix has 2 rows and 3 columns. The first row contains 1, 2, 3 and the second row contains 4, 5, 6. Alternatively, the first column contains 1 and 4, the second column contains 2 and 5, and the third column contains 3 and 6.
You can think of a matrix as a generalization of a single number. A regular number (a scalar) is just information with no structure. A vector organizes numbers in a single row or column. A matrix organizes numbers in both rows and columns, creating a two-dimensional structure that can represent relationships, transformations, and data in ways that single numbers or vectors cannot.
Matrix Dimensions
The dimensions (or size) of a matrix describe how many rows and columns it has. We always state rows first, then columns. An $m \times n$ matrix (read as “$m$ by $n$”) has $m$ rows and $n$ columns.
For example:
- A $2 \times 3$ matrix has 2 rows and 3 columns (6 entries total)
- A $4 \times 1$ matrix has 4 rows and 1 column (this is a column vector)
- A $1 \times 5$ matrix has 1 row and 5 columns (this is a row vector)
- A $3 \times 3$ matrix has 3 rows and 3 columns (9 entries total)
The order matters. A $2 \times 3$ matrix and a $3 \times 2$ matrix are different sizes, even though both have 6 entries. The shape is different.
Here is how to quickly determine the dimensions of any matrix: count the rows (going down), then count the columns (going across). Rows first, columns second, always.
Matrix Notation
We use capital letters like $A$, $B$, and $C$ to name matrices. The entries of a matrix are typically denoted with the corresponding lowercase letter and two subscripts indicating position.
For a matrix $A$, the entry in row $i$ and column $j$ is written as $a_{ij}$. This is sometimes called the $(i,j)$-entry of the matrix.
$$A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \ a_{21} & a_{22} & a_{23} \end{pmatrix}$$
The first subscript tells you which row, and the second subscript tells you which column. So $a_{23}$ means “the entry in row 2, column 3.”
We sometimes write $A = [a_{ij}]$ to indicate that $A$ is the matrix whose $(i,j)$-entry is $a_{ij}$. This is especially useful when defining a matrix by a formula for its entries.
For example, if we define the $3 \times 3$ matrix $A = [a_{ij}]$ where $a_{ij} = i + j$, then:
$$A = \begin{pmatrix} 1+1 & 1+2 & 1+3 \ 2+1 & 2+2 & 2+3 \ 3+1 & 3+2 & 3+3 \end{pmatrix} = \begin{pmatrix} 2 & 3 & 4 \ 3 & 4 & 5 \ 4 & 5 & 6 \end{pmatrix}$$
Special Types of Matrices
Several types of matrices appear so frequently that they have special names:
Square Matrix: A matrix with the same number of rows as columns (an $n \times n$ matrix). Square matrices have special properties and play a central role in linear algebra.
$$\begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix} \quad \text{and} \quad \begin{pmatrix} 1 & 0 & 2 \ 3 & 5 & 1 \ 4 & 2 & 6 \end{pmatrix}$$
The entries $a_{11}, a_{22}, a_{33}, \ldots$ (where the row and column indices are equal) form the main diagonal of a square matrix.
Diagonal Matrix: A square matrix where all entries off the main diagonal are zero. Only the diagonal entries $a_{11}, a_{22}, \ldots, a_{nn}$ can be nonzero.
$$\begin{pmatrix} 3 & 0 & 0 \ 0 & -1 & 0 \ 0 & 0 & 5 \end{pmatrix}$$
Diagonal matrices are simple to work with because the rows and columns do not “interact” with each other.
Identity Matrix: The diagonal matrix where every diagonal entry is 1. The $n \times n$ identity matrix is denoted $I$ or $I_n$.
$$I_2 = \begin{pmatrix} 1 & 0 \ 0 & 1 \end{pmatrix} \qquad I_3 = \begin{pmatrix} 1 & 0 & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{pmatrix}$$
The identity matrix is the multiplicative identity for matrices, meaning $AI = IA = A$ for any square matrix $A$ of compatible size. It plays the same role for matrices that the number 1 plays for ordinary multiplication.
Zero Matrix: A matrix where every entry is zero. We denote it by $O$ or $0$, sometimes with dimensions specified as $O_{m \times n}$.
$$O_{2 \times 3} = \begin{pmatrix} 0 & 0 & 0 \ 0 & 0 & 0 \end{pmatrix}$$
The zero matrix is the additive identity for matrices, meaning $A + O = A$ for any matrix $A$ of the same size.
Matrix Equality
Two matrices are equal if and only if they have the same dimensions and all corresponding entries are equal.
For matrices $A = [a_{ij}]$ and $B = [b_{ij}]$:
$$A = B \quad \Longleftrightarrow \quad \text{$A$ and $B$ have the same size, and } a_{ij} = b_{ij} \text{ for all } i, j$$
This definition seems obvious, but it is surprisingly useful for solving equations. If you know two matrices are equal, you can set corresponding entries equal to each other and solve for unknown values. This is often called “comparing entries” or “equating entries.”
For example, if $\begin{pmatrix} x & 3 \ 2 & y \end{pmatrix} = \begin{pmatrix} 5 & 3 \ 2 & -1 \end{pmatrix}$, then by comparing entries: $x = 5$ and $y = -1$.
Matrix Addition and Subtraction
To add (or subtract) two matrices, add (or subtract) the corresponding entries. This only works if the matrices have the same dimensions.
If $A = [a_{ij}]$ and $B = [b_{ij}]$ are both $m \times n$ matrices, then:
$$A + B = [a_{ij} + b_{ij}]$$
In other words, the $(i,j)$-entry of $A + B$ is the sum of the $(i,j)$-entries of $A$ and $B$.
Example:
$$\begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix} + \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix} = \begin{pmatrix} 1+5 & 2+6 \ 3+7 & 4+8 \end{pmatrix} = \begin{pmatrix} 6 & 8 \ 10 & 12 \end{pmatrix}$$
Subtraction works the same way:
$$\begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix} - \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix} = \begin{pmatrix} 5-1 & 6-2 \ 7-3 & 8-4 \end{pmatrix} = \begin{pmatrix} 4 & 4 \ 4 & 4 \end{pmatrix}$$
If you try to add matrices of different sizes, the operation is undefined. A $2 \times 3$ matrix cannot be added to a $2 \times 2$ matrix because there is no way to match up all the entries.
Scalar Multiplication
To multiply a matrix by a scalar (a single number), multiply every entry of the matrix by that scalar.
If $A = [a_{ij}]$ and $c$ is a scalar, then:
$$cA = [ca_{ij}]$$
Example:
$$3 \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix} = \begin{pmatrix} 3 \cdot 1 & 3 \cdot 2 \ 3 \cdot 3 & 3 \cdot 4 \end{pmatrix} = \begin{pmatrix} 3 & 6 \ 9 & 12 \end{pmatrix}$$
Scalar multiplication scales every entry uniformly. Multiplying by 2 doubles every entry. Multiplying by $-1$ flips the sign of every entry. Multiplying by 0 gives the zero matrix.
You can combine scalar multiplication with addition and subtraction:
$$2A - 3B$$
means “double every entry of $A$, triple every entry of $B$, then subtract.”
The Transpose
The transpose of a matrix is obtained by interchanging its rows and columns. If $A$ is an $m \times n$ matrix, then its transpose $A^T$ (read as “$A$ transpose”) is an $n \times m$ matrix where the $(i,j)$-entry of $A^T$ equals the $(j,i)$-entry of $A$.
In symbols, if $A = [a_{ij}]$, then $A^T = [a_{ji}]$.
Visually, you flip the matrix over its main diagonal. The first row becomes the first column, the second row becomes the second column, and so on.
Example:
$$A = \begin{pmatrix} 1 & 2 & 3 \ 4 & 5 & 6 \end{pmatrix} \quad \Longrightarrow \quad A^T = \begin{pmatrix} 1 & 4 \ 2 & 5 \ 3 & 6 \end{pmatrix}$$
Notice that $A$ is $2 \times 3$ and $A^T$ is $3 \times 2$. The dimensions swap.
For a square matrix, the transpose has the same dimensions as the original:
$$B = \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix} \quad \Longrightarrow \quad B^T = \begin{pmatrix} 1 & 3 \ 2 & 4 \end{pmatrix}$$
A matrix that equals its own transpose ($A = A^T$) is called symmetric. Symmetric matrices are especially nice to work with and appear frequently in applications.
Notation and Terminology
| Term | Meaning | Example |
|---|---|---|
| $m \times n$ matrix | $m$ rows, $n$ columns | $\begin{pmatrix} 1 & 2 & 3 \ 4 & 5 & 6 \end{pmatrix}$ is $2 \times 3$ |
| $a_{ij}$ | Entry in row $i$, column $j$ | In the above, $a_{12} = 2$ |
| $I$ or $I_n$ | Identity matrix ($n \times n$) | $\begin{pmatrix} 1 & 0 \ 0 & 1 \end{pmatrix}$ |
| $O$ | Zero matrix | $\begin{pmatrix} 0 & 0 \ 0 & 0 \end{pmatrix}$ |
| $A^T$ | Transpose (swap rows and columns) | If $A = \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix}$, then $A^T = \begin{pmatrix} 1 & 3 \ 2 & 4 \end{pmatrix}$ |
| Square matrix | Same number of rows and columns | A $3 \times 3$ matrix |
| Diagonal matrix | Non-zero entries only on diagonal | $\begin{pmatrix} 5 & 0 \ 0 & 3 \end{pmatrix}$ |
| Main diagonal | Entries $a_{11}, a_{22}, a_{33}, \ldots$ | Top-left to bottom-right |
| Symmetric matrix | $A = A^T$ | $\begin{pmatrix} 1 & 2 \ 2 & 3 \end{pmatrix}$ |
Examples
What are the dimensions of the matrix $A = \begin{pmatrix} 1 & 2 \ 3 & 4 \ 5 & 6 \end{pmatrix}$?
Solution:
To find the dimensions, count the rows first, then the columns.
Step 1: Count the rows (going down).
- Row 1: $(1, 2)$
- Row 2: $(3, 4)$
- Row 3: $(5, 6)$
There are 3 rows.
Step 2: Count the columns (going across).
- Column 1: $(1, 3, 5)$
- Column 2: $(2, 4, 6)$
There are 2 columns.
Answer: $A$ is a $3 \times 2$ matrix (3 rows, 2 columns).
Note: This matrix has 6 entries in total ($3 \times 2 = 6$). Be careful not to confuse this with a $2 \times 3$ matrix, which would have the rows and columns swapped.
Find $A + B$ where $A = \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix}$ and $B = \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix}$.
Solution:
First, verify that addition is possible: both matrices are $2 \times 2$, so they have the same dimensions. Addition is defined.
Step 1: Add corresponding entries.
$$A + B = \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix} + \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix}$$
Step 2: Compute each entry.
- Position $(1,1)$: $1 + 5 = 6$
- Position $(1,2)$: $2 + 6 = 8$
- Position $(2,1)$: $3 + 7 = 10$
- Position $(2,2)$: $4 + 8 = 12$
Answer:
$$A + B = \begin{pmatrix} 6 & 8 \ 10 & 12 \end{pmatrix}$$
Find $3A - 2B$ where $A = \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix}$ and $B = \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix}$.
Solution:
We need to compute $3A$, then $2B$, then subtract.
Step 1: Compute $3A$ (multiply every entry of $A$ by 3).
$$3A = 3 \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix} = \begin{pmatrix} 3 & 6 \ 9 & 12 \end{pmatrix}$$
Step 2: Compute $2B$ (multiply every entry of $B$ by 2).
$$2B = 2 \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix} = \begin{pmatrix} 10 & 12 \ 14 & 16 \end{pmatrix}$$
Step 3: Subtract $2B$ from $3A$ (subtract corresponding entries).
$$3A - 2B = \begin{pmatrix} 3 & 6 \ 9 & 12 \end{pmatrix} - \begin{pmatrix} 10 & 12 \ 14 & 16 \end{pmatrix}$$
$$= \begin{pmatrix} 3 - 10 & 6 - 12 \ 9 - 14 & 12 - 16 \end{pmatrix}$$
$$= \begin{pmatrix} -7 & -6 \ -5 & -4 \end{pmatrix}$$
Answer:
$$3A - 2B = \begin{pmatrix} -7 & -6 \ -5 & -4 \end{pmatrix}$$
Find $A^T$ where $A = \begin{pmatrix} 1 & 2 & 3 \ 4 & 5 & 6 \end{pmatrix}$.
Solution:
The transpose swaps rows and columns. The first row of $A$ becomes the first column of $A^T$, and the second row of $A$ becomes the second column of $A^T$.
Step 1: Identify the rows of $A$.
- Row 1: $(1, 2, 3)$
- Row 2: $(4, 5, 6)$
Step 2: These become the columns of $A^T$.
- Column 1 of $A^T$: $(1, 2, 3)$ written vertically
- Column 2 of $A^T$: $(4, 5, 6)$ written vertically
Step 3: Write $A^T$.
$$A^T = \begin{pmatrix} 1 & 4 \ 2 & 5 \ 3 & 6 \end{pmatrix}$$
Verification: $A$ is $2 \times 3$, so $A^T$ should be $3 \times 2$. Indeed, $A^T$ has 3 rows and 2 columns.
Alternative method: Entry by entry, $(A^T){ij} = a{ji}$. For example, the entry in row 2, column 1 of $A^T$ equals $a_{12} = 2$.
Answer:
$$A^T = \begin{pmatrix} 1 & 4 \ 2 & 5 \ 3 & 6 \end{pmatrix}$$
Find all values of $x$ and $y$ such that $\begin{pmatrix} x+y & 2 \ 3 & x-y \end{pmatrix} = \begin{pmatrix} 5 & 2 \ 3 & 1 \end{pmatrix}$.
Solution:
For two matrices to be equal, corresponding entries must be equal. Both matrices are $2 \times 2$, so we can compare entries position by position.
Step 1: Set up equations by comparing corresponding entries.
| Position | Left Matrix | Right Matrix | Equation |
|---|---|---|---|
| $(1,1)$ | $x + y$ | $5$ | $x + y = 5$ |
| $(1,2)$ | $2$ | $2$ | $2 = 2$ (always true) |
| $(2,1)$ | $3$ | $3$ | $3 = 3$ (always true) |
| $(2,2)$ | $x - y$ | $1$ | $x - y = 1$ |
The positions $(1,2)$ and $(2,1)$ are already equal, so they give no new information. The useful equations are:
$$x + y = 5$$ $$x - y = 1$$
Step 2: Solve the system of equations.
Add the two equations to eliminate $y$: $$(x + y) + (x - y) = 5 + 1$$ $$2x = 6$$ $$x = 3$$
Substitute $x = 3$ into the first equation: $$3 + y = 5$$ $$y = 2$$
Step 3: Verify the solution.
Check: $x + y = 3 + 2 = 5$ and $x - y = 3 - 2 = 1$. Both equations are satisfied.
The matrices become: $$\begin{pmatrix} 3+2 & 2 \ 3 & 3-2 \end{pmatrix} = \begin{pmatrix} 5 & 2 \ 3 & 1 \end{pmatrix} \quad \checkmark$$
Answer: $x = 3$ and $y = 2$
Key Properties and Rules
Properties of Matrix Addition
For matrices $A$, $B$, and $C$ of the same size:
- Commutative: $A + B = B + A$
- Associative: $(A + B) + C = A + (B + C)$
- Additive Identity: $A + O = A$ (where $O$ is the zero matrix)
- Additive Inverse: $A + (-A) = O$ (where $-A$ is the matrix with all entries negated)
Properties of Scalar Multiplication
For matrices $A$ and $B$ of the same size and scalars $c$ and $d$:
- Associative: $c(dA) = (cd)A$
- Distributive over matrix addition: $c(A + B) = cA + cB$
- Distributive over scalar addition: $(c + d)A = cA + dA$
- Identity: $1 \cdot A = A$
Properties of the Transpose
For matrices $A$ and $B$ and scalar $c$:
- Double transpose: $(A^T)^T = A$
- Transpose of a sum: $(A + B)^T = A^T + B^T$
- Transpose of a scalar multiple: $(cA)^T = cA^T$
- Dimension swap: If $A$ is $m \times n$, then $A^T$ is $n \times m$
Dimension Compatibility
- Addition/Subtraction: $A$ and $B$ must have the same dimensions
- Scalar Multiplication: Always defined for any matrix and any scalar
- Transpose: Always defined; swaps the dimensions
Real-World Applications
Spreadsheets and Data Tables
Every spreadsheet is a matrix. When you have sales data with products in rows and months in columns, you have a matrix. Adding two spreadsheets (same layout) combines the data entry by entry. Multiplying by a scalar converts units or applies a percentage change. These matrix operations are exactly what happens when you do arithmetic across spreadsheet cells.
For example, if $A$ contains your company’s Q1 sales and $B$ contains Q2 sales (same products, same format), then $A + B$ gives total sales for the first half of the year. And $0.1 \cdot A$ gives 10% of Q1 sales (perhaps for calculating bonuses).
Image Representation
Digital images are stored as matrices. A grayscale image is a matrix where each entry represents the brightness of one pixel (typically 0 for black, 255 for white). A 1920x1080 HD image is essentially a $1080 \times 1920$ matrix with over 2 million entries.
Color images use three matrices (one each for red, green, and blue channels). Image processing operations like adjusting brightness (scalar multiplication), combining images (addition), and various filters all use matrix operations. When you apply a filter to a photo, you are doing matrix arithmetic.
Adjacency Matrices for Networks and Graphs
In network analysis, connections between nodes can be represented as a matrix. If you have $n$ people in a social network, the adjacency matrix is an $n \times n$ matrix $A$ where $a_{ij} = 1$ if person $i$ is friends with person $j$, and $a_{ij} = 0$ otherwise.
This simple representation enables powerful analysis. The transpose $A^T$ represents the same friendships viewed from the opposite direction. For directed networks (like Twitter follows), $A$ might not equal $A^T$, revealing asymmetric relationships. Adding adjacency matrices can combine different types of relationships.
Storing Coefficients of Systems of Equations
As you saw in the previous lesson, systems of linear equations are naturally represented using matrices. The coefficient matrix $A$ in $A\vec{x} = \vec{b}$ stores all the coefficients of your system in an organized way. This organization is not just for convenience; it reveals the structure of the system and enables systematic solution methods like Gaussian elimination.
For example, the system: $$2x + 3y = 7$$ $$x - y = 2$$
becomes the matrix equation:
$$\begin{pmatrix} 2 & 3 \ 1 & -1 \end{pmatrix} \begin{pmatrix} x \ y \end{pmatrix} = \begin{pmatrix} 7 \ 2 \end{pmatrix}$$
The coefficient matrix captures all the relationships between variables, separate from the specific values you are trying to achieve.
Self-Test Problems
Problem 1: What are the dimensions of the matrix $\begin{pmatrix} 1 & 0 & -2 & 5 \ 3 & 7 & 1 & -1 \ 2 & 4 & 6 & 8 \end{pmatrix}$?
Show Answer
Count rows: 3 (going down)
Count columns: 4 (going across)
The matrix is $3 \times 4$.
Problem 2: Find $A - B$ where $A = \begin{pmatrix} 4 & -1 \ 2 & 5 \end{pmatrix}$ and $B = \begin{pmatrix} 1 & 3 \ -2 & 1 \end{pmatrix}$.
Show Answer
Subtract corresponding entries:
$$A - B = \begin{pmatrix} 4-1 & -1-3 \ 2-(-2) & 5-1 \end{pmatrix} = \begin{pmatrix} 3 & -4 \ 4 & 4 \end{pmatrix}$$
Problem 3: Write down the $3 \times 3$ identity matrix $I_3$.
Show Answer
The identity matrix has 1s on the main diagonal and 0s everywhere else:
$$I_3 = \begin{pmatrix} 1 & 0 & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{pmatrix}$$
Problem 4: Compute $2A + 3B$ where $A = \begin{pmatrix} 1 & -1 \ 0 & 2 \end{pmatrix}$ and $B = \begin{pmatrix} 2 & 0 \ -1 & 1 \end{pmatrix}$.
Show Answer
Step 1: Compute $2A$: $$2A = \begin{pmatrix} 2 & -2 \ 0 & 4 \end{pmatrix}$$
Step 2: Compute $3B$: $$3B = \begin{pmatrix} 6 & 0 \ -3 & 3 \end{pmatrix}$$
Step 3: Add: $$2A + 3B = \begin{pmatrix} 2+6 & -2+0 \ 0+(-3) & 4+3 \end{pmatrix} = \begin{pmatrix} 8 & -2 \ -3 & 7 \end{pmatrix}$$
Problem 5: Find the transpose of $M = \begin{pmatrix} 1 & 2 \ 3 & 4 \ 5 & 6 \end{pmatrix}$.
Show Answer
The rows of $M$ become the columns of $M^T$:
$$M^T = \begin{pmatrix} 1 & 3 & 5 \ 2 & 4 & 6 \end{pmatrix}$$
Check: $M$ is $3 \times 2$, so $M^T$ is $2 \times 3$. The dimensions swap.
Problem 6: Is the matrix $\begin{pmatrix} 1 & 2 & 3 \ 2 & 4 & 5 \ 3 & 5 & 6 \end{pmatrix}$ symmetric? Explain.
Show Answer
A matrix is symmetric if $A = A^T$, meaning $a_{ij} = a_{ji}$ for all entries.
Let us check the off-diagonal entries:
- $a_{12} = 2$ and $a_{21} = 2$ (equal)
- $a_{13} = 3$ and $a_{31} = 3$ (equal)
- $a_{23} = 5$ and $a_{32} = 5$ (equal)
Since all entries above the diagonal equal their mirror images below the diagonal, yes, the matrix is symmetric.
Problem 7: Find all values of $a$ and $b$ such that $\begin{pmatrix} 2a & 4 \ 6 & a+b \end{pmatrix} = \begin{pmatrix} 6 & 4 \ 6 & 5 \end{pmatrix}$.
Show Answer
Compare corresponding entries:
From position $(1,1)$: $2a = 6$, so $a = 3$
From position $(2,2)$: $a + b = 5$, so $3 + b = 5$, giving $b = 2$
The other positions ($(1,2)$ and $(2,1)$) are already equal: $4 = 4$ and $6 = 6$.
Answer: $a = 3$ and $b = 2$
Problem 8: Why is the sum $\begin{pmatrix} 1 & 2 & 3 \ 4 & 5 & 6 \end{pmatrix} + \begin{pmatrix} 1 & 2 \ 3 & 4 \ 5 & 6 \end{pmatrix}$ undefined?
Show Answer
Matrix addition requires both matrices to have the same dimensions.
The first matrix is $2 \times 3$ (2 rows, 3 columns).
The second matrix is $3 \times 2$ (3 rows, 2 columns).
Since $2 \times 3 \neq 3 \times 2$, the dimensions do not match, and addition is undefined.
There is no way to add entry-by-entry when the positions do not correspond.
Summary
-
A matrix is a rectangular array of numbers arranged in rows and columns.
-
An $m \times n$ matrix has $m$ rows and $n$ columns. Always state rows first.
-
The entry in row $i$ and column $j$ is denoted $a_{ij}$. The notation $A = [a_{ij}]$ defines a matrix by its entries.
-
Special matrices include:
- Square matrix: Same number of rows as columns ($n \times n$)
- Diagonal matrix: Only the main diagonal entries can be nonzero
- Identity matrix $I_n$: Diagonal matrix with all 1s on the diagonal
- Zero matrix $O$: All entries are zero
-
Two matrices are equal if and only if they have the same dimensions and all corresponding entries match.
-
Matrix addition and subtraction are performed entry by entry. The matrices must have the same dimensions.
-
Scalar multiplication multiplies every entry of a matrix by the scalar.
-
The transpose $A^T$ swaps rows and columns. If $A$ is $m \times n$, then $A^T$ is $n \times m$.
-
A symmetric matrix satisfies $A = A^T$.
-
Matrix operations satisfy many familiar properties: commutativity and associativity of addition, distributive laws, and double transpose returning the original matrix.
-
Matrices appear everywhere: spreadsheets, digital images, network analysis, and systems of equations. Learning to work with matrices opens the door to powerful computational tools.