Skip to content

9.9 Vectors and matrices

Vectors

Let \(S\) be a set. A vector \(V\) of elements in \(S\) is a finite array of \(n\) elements in \(S\), \(n \in \mathbb{N}\).

\(V \in S^n, V = \begin{pmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{pmatrix}\)

We will work (typically) in \(\mathbb{R}^n\)

  • Column vectors: \(V = \begin{pmatrix} a_1 \\ a_2 \\ \vdots \\ a_n \end{pmatrix}\)

  • Row vectors: \(W = (a_1, a_2, \dots, a_m)\)

Double interpretation of \(\mathbb{R}^n\)

  • Points in the Cartesian product.
  • Vectors (arrows starting at the origin).

Let \({P} = (2,3)\) and \(V= \begin{pmatrix} 1 \\ 2 \end{pmatrix}\)

image

Example of vectors in \(\mathbb{R}^2\) or \(\mathbb{R}^3\)

Consider a function \(\sigma: [a,b] \subset \mathbb{R} \to \mathbb{R}^2\).

Define \(\sigma(t) = (\cos t, \sin t)\), where \([a,b] = [0, 2\pi]\).

\(\begin{aligned} \sigma(0) &= (1,0) \\ \sigma\left(\frac{\pi}{2}\right) &= (0,1) \\ \sigma\left(\frac{\pi}{4}\right) &= \left( \frac{\sqrt{2}}{2}, \frac{\sqrt{2}}{2} \right) \\ \sigma(\pi) &= (-1,0) \end{aligned}\)

Now, \(\mathbf{\sigma}(t) = (X(t), Y(t))\) with \(X: [0,2\pi] \to \mathbb{R}\) and \(Y: [0,2\pi] \to \mathbb{R}\).

The derivative of \(\sigma(t)\) is given by: \(\mathbf{\sigma}'(t) = (X'(t), Y'(t))\)

In our case: \(\mathbf{\sigma}'(t) = (-\sin t, \cos t)\)

image

Matrices

A matrix \(A \in \mathbb{R}^{m \times n}\) is a rectangular arrangement of coefficients in \(\mathbb{R}\) of the form:

m is rows and n is columns

\(A=\begin{pmatrix}a_{11} & a_{12} & \dots & a_{1n}\\ a_{21} & a_{22} & \dots & a_{2n}\\ a_{31} & a_{32} & \dots & a_{3n}\\ \vdots & \vdots & \ddots & \vdots\\ a_{m1} & a_{m2} & \dots & a_{mn}\end{pmatrix}\)

Examples

\(A \in \mathbb{R}^{2 \times 3}\), \(B \in \mathbb{R}^{3 \times 2}\), \(C \in \mathbb{R}^{2 \times 2}\).

\(A = \begin{pmatrix} 1 & 2 & 3 \\ -\pi & e^2 & \sqrt{2} \end{pmatrix}, \quad B = \begin{pmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{pmatrix}, \quad C = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\)

Matrices and linear systems of equations

Consider the system: \(\begin{cases} 3x + 2y + 7z & = 100 \\ x + y + 2z &= 70 \\ 5x + 2y + 3z & = 127 \\ 3x + y - 7z & = 20 \end{cases}\)

This can be written as: \(\begin{pmatrix}3 & 2 & 7\\ 1 & 1 & 2\\ 5 & 2 & 3\\ 3 & 1 & -7\end{pmatrix}\begin{pmatrix}x\\ y\\ z\end{pmatrix}=\begin{pmatrix}100\\ 70\\ 127\\20\end{pmatrix}\)

Product between a matrix \(A \in \mathbb{R}^{m \times n}\) and a vector \(V \in \mathbb{R}^n\)

\(W = A \cdot V \in \mathbb{R}^m\) is defined as: \(W=\begin{pmatrix}W_1\\ W_2\\ \vdots\\ W_{m}\end{pmatrix}\)

Then \(\begin{aligned}W_{j}=\sum_{k=1}^{n}a_{jk}\cdot V_{k}\end{aligned}\)

The product can be written as: \(=\begin{pmatrix}a_{11} & a_{12} & \dots & a_{1n}\\ a_{21} & a_{22} & \dots & a_{2n}\\ \vdots & \vdots & \ddots & \vdots\\ a_{m1} & a_{m2} & \dots & a_{mn}\end{pmatrix}\begin{pmatrix}V_1\\ V_2\\ \vdots\\ V_{n}\end{pmatrix}=\begin{pmatrix}\sum_{k=1}^{n}a_{1k}V_{k}\\ \vdots\\\sum_{k=1}^{n}a_{jk}V_{k}\\ \vdots\\ \sum_{k=1}^{n}a_{mk}V_{k}\end{pmatrix}\)

Example

\(A \in \mathbb{R}^{3 \times 2}\), \(A = \begin{pmatrix} 2 & 1 \\ -1 & 0 \\ 0 & 1 \end{pmatrix} , \quad W = \begin{pmatrix} -1 \\ 2 \end{pmatrix}\)

The product of \(A\) and \(W\) is \(A \cdot W = \begin{pmatrix} 2 & 1 \\ -1 & 0 \\ 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} -1 \\ 2 \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix}\)

If \(A \in \mathbb{R}^{m \times n}\), \(W \in \mathbb{R}^n\), \(A \cdot W \in \mathbb{R}^m\), we usually identify \(\mathbb{R}^n\) with \(\mathbb{R}^{n \times 1}\).

\(W\in\mathbb{R}^{n},\quad W=\begin{pmatrix}W_1\\ W_2\\ \vdots\\ W_{n}\end{pmatrix},\quad V\in\mathbb{R}^{n\times1},\quad V=\begin{pmatrix}V_1\\ V_2\\ \vdots\\ V_{n}\end{pmatrix}\)

Notation: \(A \in \mathbb{R}^{m \times n}\), we write \(A = (a_{ij})_{\substack{1 \leq i \leq m \\ 1 \leq j \leq n}}\)