4.1: Matrices
- Page ID
- 125043
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Matrix
A matrix is a rectangular array of objects, often numbers.
The rectangular array of numbers \(\left[ \begin{array}{c} \begin{array}{cc} 5 & -2 \\ 0 & 4 \\ -6 & 3 \end{array} \\ \ \end{array} \right]\) is a matrix having 3 rows and 2 columns.
Dimension of a Matrix
Matrix having \(m\) number of rows and \(n\) number of columns has dimension (size) \(m \times n\) (pronounced as "m by n") and is called an \(m \times n\) matrix.
The matrix in Example \(3\times 2\) matrix since it is composed of 3 rows and 2 columns. When specifying the dimension of a matrix, the number of rows is stated first and the number of columns second.
is aElements of a Matrix
It is common to use an uppercase letter of the alphabet to name a matrix and the corresponding lowercase letter to name an element (entry or member) of the matrix. Subscripts are attached to the lowercase letter to specify its position in the matrix.
The first number in subscript indicates the row in which the element resides and the second number the column.
The subscript numbers appear adjacent to each other and typically without a comma separating them.
We could name the matrix of Example . We specify the element \(-2\) in row 1, column 2, with the notation \(a_{12}\). The lowercase \(a\) is used to indicate that the element is from matrix \(A\) and the subscripts indicate we are observing the entry in row 1, column 2. The subscript is not the number 12, but rather the two individual numbers, 1 and 2.
In general, the notation \(a_{i j}\) denotes the entry in row \(i\) and column \(j\).
Some other elements of \(A\) are
\(a_{11}=5,\) the number in row 1, column 1
\(a_{31}=-6,\) the number in row 3, column 1
\(a_{22}=4,\) the number in row 2, column 2
In general, an \(m\mathrm{\times }n\) matrix has the form \(\left[ \begin{array}{c} \begin{array}{c} \begin{array}{cc} a_{\mathrm{11}} & a_{\mathrm{12}} \end{array} \mathrm{\ \ \ \ }\mathrm{\cdots }\mathrm{\ \ \ }a_{\mathrm{1}n} \\ \begin{array}{cc} a_{\mathrm{21}} & a_{\mathrm{22}} \end{array} \mathrm{\ \ \ \ }\mathrm{\cdots }\mathrm{\ \ \ }a_{\mathrm{2}n} \\ \begin{array}{cc} a_{\mathrm{31}} & a_{\mathrm{32}} \end{array} \mathrm{\ \ \ \ }\mathrm{\cdots }\mathrm{\ \ \ }a_{\mathrm{3}n} \end{array} \\ \mathrm{\vdots } \\ \begin{array}{cc} a_{m\mathrm{1}} & a_{m\mathrm{2}} \end{array} \mathrm{\ \ \ \ }\mathrm{\cdots }\mathrm{\ \ \ }a_{mn} \end{array} \right]\). For some number \(m\), the element \(a_{m\mathrm{2}}\) is the number in row \(m\), column 2.
Your turn:
In the matrix \(B\mathrm{=}\left[ \begin{array}{c} \begin{array}{ccc} 0 & \mathrm{-}\mathrm{4} & \mathrm{2} \\ \mathrm{1} & \mathrm{-}\mathrm{1} & \mathrm{5} \\ \mathrm{-}\mathrm{3} & \mathrm{3} & \mathrm{8} \end{array} \\ \mathrm{\ } \end{array} \right],\)
- Specify the size of \(B\).
- Find the value of \(b_{11}.\)
- Find the value of \(b_{13}.\)
- Find the value of \(b_{32}.\)
ANS: (a) \(3\times 3\), (b) 0, (c) 2, (d) 3
Equal Matrices
Two matrices \(A\) and \(B\) are said to be equal, written as \(A=B\), if they are the same size and all the corresponding entries are equal.
In matrix notation, for all \(i\) and \(j\),\(\mathrm{\ }A\mathrm{=}B\) if \(a_{ij}\mathrm{=}b_{ij}.\) The notation \(a_{ij}\) names the element in row \(i\) and column \(j\) of matrix \(A\). Similarly, the notation \(b_{ij}\) names the element in row \(i\) and column \(j\) of matrix \(B\). The notation \(a_{ij}\mathrm{=}b_{ij}\) indicates that the element in row \(i\) and column \(j\) of matrix \(A\) is the same as the element in row \(i\) and column \(j\) of matrix \(B.\)
Square Matrices
A matrix is called square if it has the same number of columns as rows.
The \(2\times 2\ \)matrices \(A\) and \(B\) are both equal and square.
\(A=\left[ \begin{array}{cc} 3 & 4 \\ 2 & 1 \end{array} \right]\) and \(B=\left[ \begin{array}{cc} 3 & 4 \\ 2 & 1 \end{array} \right]\)
Main Diagonal of a Square Matrix
Consider a square matrix, say \[A=\left[\begin{array}{ccc}
2 & 1 & 0 \\
3 & 4 & -5 \\
-1 & 6 & 7
\end{array}\right] \nonumber \]
Imagine a line passing from the top left element to the bottom right element as in the picture.
\[\left.A=\mid \begin{array}{ccc}
8 & 1 & 0 \\
3 & 4 & -5 \\
-1 & 6 & 7
\end{array}\right] \nonumber \]
This diagonal set of elements from the top left element to the bottom right is called the main diagonal of the matrix.
Diagonal and Non-Diagonal Elements of a Matrix
The elements lying on the main diagonal of matrix \(A\) are called the diagonal elements of matrix \(A\). The elements 2, 4, and 7 are the diagonal elements of matrix \(A\). The elements lying off the main diagonal of matrix \(A\) are called the non-diagonal or off-diagonal elements of matrix \(A\). The elements 1, 0, 3, -5, -1, and 6 are the non-diagonal elements of matrix \(A\).
The Identity Matrix
An Identity matrix is a square matrix that has only 1’s on its main diagonal and 0’s everywhere else.
A matrix in which every diagonal element is 1 and every non-diagonal element is 0 is an identity matrix. Identity matrices are typically named with the uppercase letter \(I.\) It is not uncommon to write the size of the matrix as a subscript on the \(I.\)
The square matrix \(I=\left[ \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right]\) is the \(3\times 3\). We could write \(I_{3\times 3}\) to indicate the \(3\times 3\) identity matrix.
The Zero Matrix
The zero matrix is a matrix, in which every element is 0.
Zero matrices are commonly named with a 0.
The matrix \(0=\left[ \begin{array}{cc} 0 & 0 \\ 0 & 0 \\ 0 & 0 \end{array} \right]\) is a zero matrix.
The Transpose of a Matrix
Consider some \(m\times n\) matrix \(A.\ \)For example, suppose \(A\) is the \(2\times 3\) matrix \(A=\left[ \begin{array}{ccc} 2 & 3 & 4 \\ 5 & 6 & 7 \end{array} \right]\).Form a new matrix, call it \(A\)-transpose and denote it by \(A^T\), by making
- The first row of \(A\) the first column of \(A^T\),
- The second row of \(A\) the second column of \(A^T\).
Then \(A^T=\left[ \begin{array}{cc} 2 & 5 \\ 3 & 6 \\ 4 & 7 \end{array} \right]\) is the transpose of \(A=\ \left[ \begin{array}{ccc} 2 & 3 & 4 \\ 5 & 6 & 7 \end{array} \right]\).
The rows of a matrix are the columns of its transpose. If the matrix \(A\) is size \(m \times n\), then dimension of \(A^T\) is \(n \times m\).
Row Matrices and Column Matrices
A row matrix is a matrix with only one row and any number of columns.
The matrix \(R=\left[ \begin{array}{ccc} 3 & 4 & 5 \end{array} \right]\) is a row matrix with 3 columns. It is a \(1\times 3\) matrix.
A column matrix is a matrix with only one column and any number of rows.
The matrix \(C=\left[ \begin{array}{c} 6 \\ 7 \end{array} \right]\) is a column matrix with 2 rows. It is a \(2\times 1\) matrix.
Vectors as Matrices
When we first described vectors, we expressed them using the bracket notation. For example, we could write a vector as \(\left\langle 2,\ 4,\ 6\right\rangle\). We can just as easily describe this vector using a row matrix \(\left[ \begin{array}{ccc} 2 & 4 & 6 \end{array} \right]\ \ \)or column matrix \(\left[ \begin{array}{c} 2 \\ 4 \\ 6 \end{array} \right].\)
Try These
Specify the dimension of each matrix.
- \(S=\left[\begin{array}{ccc}
0 & 2 & 5 \\
-6 & -3 & 2 \\
1 & 9 & 2 \\
8 & -1 & 4
\end{array}\right]\) - \(T=\left[\begin{array}{lll}
5 & 6 & -3 \\
0 & 0 & -3
\end{array}\right]\) - \(Q=\left[\begin{array}{lll}
1 & 0 & -1
\end{array}\right]\)
- Answer
-
- \(4\times 3\)
- \(2\times 3\)
- \(1\times 3\)
True or False: The transpose of a square matrix is also a square matrix.
- Answer
-
True
In the matrix \(S=\left[\begin{array}{ccc}
0 & 2 & 5 \\
-6 & -3 & 2 \\
1 & 9 & 2 \\
8 & -1 & 4
\end{array}\right]\)
- Find the value of \(S_{13}\).
- Find the value of \(S_{23}\).
- Find the value of \(S_{31}\).
- Find the value of \(S_{43}\).
- Answer
-
- 5
- 2
- 1
- 4
Construct and name the transpose of \(S=\left[\begin{array}{ccc}
0 & 2 & 5 \\
-6 & -3 & 2 \\
1 & 9 & 2 \\
8 & -1 & 4
\end{array}\right]\)
- Answer
-
\(S^T=\left[ \begin{array}{ccc} 0 & -6 & 1 \\ 2 & -3 & 9 \\ 5 & 2 & 2 \end{array} \ \ \ \ \begin{array}{c} 8 \\ -1 \\ 4 \end{array} \right]\)
Construct \(I_{4 \times 4}\).
- Answer
Construct the transpose of \(I_{3 \times 3}\).
- Answer
-
\(I^T_{3\times 3}=I_{3\times 3}\)
Write the column matrix \(\left[\begin{array}{l}
4 \\
3 \\
2
\end{array}\right]\) using vector bracket notation, < >.
- Answer
-
\(\mathrm{<}\)4,3,2\(\mathrm{>}\)
Construct a 2 × 2 matrix in which the diagonal elements are 5 and 6 and the non-diagonal elements are 0 and 2.
- Answer
-
\(\left[ \begin{array}{cc} 5 & 0 \\ 2 & 6 \end{array} \right]\) or \(\left[ \begin{array}{cc} 5 & 2 \\ 0 & 6 \end{array} \right]\)