0:00 / 0:00

Basics of Matrices

What is a Matrix?
A matrix is a rectangular array of numbers, e.g. A=[373730100012345]A= \left[ \begin{array}{rrrrr} 3&7&3&7&3\\ 0&1&0&0&0\\ 1&2&3&4&5 \end{array} \right]

Size and Dimension

  • A matrix with mm rows and nn columns is of size m×nm\times n, where mm and nn are its dimensions. E.g. the matrix AA above is of size 3×53 \times 5, and we may make this explicit by writing A3×5A_{3\times 5}.
  • A square matrix has the same number of rows and columns (size n×n)n\times n).

Entries

The numbers inside a matrix are called entries.
The (i,j)(i,j)-entry of matrix AA is the number in row ii and column jj, denoted aija_{ij}.
Example
A=[373730100012345]A= \left[ \begin{array}{rrrrr} 3&7&3&7&3\\ 0&1&0&0&0\\ 1&2&3&4&5 \end{array} \right]
Find a22a_{22} and a14a_{14}.
a22=1a_{22} = 1 (row 2, column 2)
a14=7a_{14} = 7 (row 1, column 4)
PAGE BREAK

Zero Matrix

The zero matrix is the m×nm\times n matrix where every entry is 0.

The 3×23\times2 zero matrix is 03×2=[000000]0_{3 \times 2}=\left[ \begin{array}{rr} 0&0\\ 0&0\\ 0&0 \end{array} \right].

Diagonal Matrices

The main diagonal of a square matrix AA are the entries with matching row and column numbers, aiia_{ii}:
[a11a12a13a21a22a23a31a32a33]\left[ \begin{array}{rrrr} \bm{a_{11}}&a_{12}&a_{13}\\ a_{21}&\bm{a_{22}}&a_{23}\\ a_{31}&a_{32}&\bm{a_{33}}\\ \end{array} \right]
A matrix is said to be diagonal if every entry not on the main diagonal is 0, e.g.[300010002]\left[ \begin{array}{rrrr} 3&0&0\\ 0&1&0\\ 0&0&2\\ \end{array} \right]

Identity Matrix

The identity matrix InI_nis a diagonal n×nn \times n matrix with 1s along the main diagonal, e.g. I3=[100010001]I_3= \begin{bmatrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{bmatrix}

0:00 / 0:00

Matrix Operations

Matrix Addition

Two matrices can be added/subtracted if they are the same size. The result will also be the same size.
To add two matrices, simply add corresponding entries.
A+B=[aij+bij]\boxed{\quad A+B=\left[\begin{array}{c}a_{ij}+b_{ij}\end{array}\right] \quad}
Example
Compute [101011]+[322141]\left[ \begin{array}{rrrrr} 1&0&-1\\ 0&1&1 \end{array} \right]+ \left[ \begin{array}{rrrrr} 3&-2&2\\ 1&4&-1 \end{array} \right].
=[1+30+(2)1+20+11+41+(1)]=[421150]=\left[ \begin{array}{rrrrr} 1+3&\quad0+(-2)&-1+2\\ 0+1&1+4&\quad1+(-1) \end{array} \right] =\left[ \begin{array}{rrrrr} 4&-2&1\\ 1&5&0 \end{array} \right]
Properties
  • 𝐴+𝐵=𝐵+𝐴𝐴 + 𝐵 = 𝐵 + 𝐴
  • 𝐴+(𝐵+𝐶)=(𝐴+𝐵)+𝐶𝐴+(𝐵+𝐶)=(𝐴+𝐵)+𝐶
  • There exists a zero matrix such that 𝐴+[ 0 ]=𝐴𝐴+[\ 0\ ]=𝐴
  • There exists a negative matrix such that A+(A)=[ 0 ]A+(-A)=[\ 0\ ]
PAGE BREAK

Scalar Multiplication

We can multiply any matrix AA by any scalar kk by multiplying every entry of AA by kk:
kA=[k aij]\boxed{\quad kA=\left[\begin{array}{c}k\ a_{ij}\end{array}\right] \quad}
Example
Compute (4)[322141](-4)\left[ \begin{array}{rrrrr} 3&-2&2\\ 1&4&-1 \end{array} \right].
=[3(4)2(4)2(4)1(4)4(4)1(4)]=[12884164]= \left[ \begin{array}{rrrrr} 3(-4)&-2(-4)&2(-4)\\ 1(-4)&4(-4)&-1(-4) \end{array} \right] = \left[ \begin{array}{rrrrr} -12&8&-8\\ -4&-16&4 \end{array} \right]
Properties
If AA and BB are matrices and c, dRc, \ d \in \reals:
  • c(A+B)=cA+cBc(A+B)=cA+cB
  • (c+d)A=cA+dA(c+d)A=cA+dA
  • c(dA)=(cd)Ac(dA)=(cd)A
0:00 / 0:00

Example: Basics of Matrices

Consider the matrix A=[1234]A= \left[ \begin{array}{rr} 1&2\\ -3&-4\\ \end{array} \right].
a) Find 2A3I22A-3I_2.
Recall that I2I_2 is the 2×22\times 2 identity matrix (1s along the main diagonal, 0s elsewhere).
2A3I2=  2[1234]3[1001]=[2468][3003]=[14611]\begin{alignedat}{3} 2A-3I_2 &=& \ \ 2 &\left[ \begin{array}{rr} 1&2\\ -3&-4\\ \end{array} \right] -3 &\left[ \begin{array}{rr} 1&0\\ 0&1\\ \end{array} \right]\\[1.5em] &=& &\left[ \begin{array}{rr} 2&4\\ -6&-8\\ \end{array} \right] - &\left[ \begin{array}{rr} 3&0\\ 0&3\\ \end{array} \right]\\[1.5em] &=& &\left[ \begin{array}{rr} -1&4\\ -6&-11\\ \end{array} \right] \end{alignedat}
b) What are the entries in the main diagonal of the result?
1,11-1, -11
Given the matrix A=[201013002]A=\begin{bmatrix} 2&0&1\\0&1&3\\0&0&2 \end{bmatrix}, define B=A+03×32I3B=A+0_{3\times3}-2I_3 and find the following entries.