The transpose turned a 2-by-3 matrix into a 3-by-2 matrix.
The transpose turns rows into columns and columns into rows.
You can picture it as a reflection of the matrix across a 45-degree axis going from top-left to bottom-right.
Comment Source:The transpose turned a 2-by-3 matrix into a 3-by-2 matrix.
The transpose turns rows into columns and columns into rows.
You can picture it as a reflection of the matrix across a 45-degree axis going from top-left to bottom-right.
Taking the transpose of the transpose gives you back the original matrix:
\[{(M^T)}^T = M\]
A row-vector is a matrix with just one row.
A column-vector is a matrix with just one column.
Comment Source:Taking the transpose of the transpose gives you back the original matrix:
\\[{(M^T)}^T = M\\]
A _row-vector_ is a matrix with just one row.
A _column-vector_ is a matrix with just one column.
Comment Source:The _dot product_ is an operation that takes two vectors in and outputs a single number (a scalar).
Here is how it works:
\\[
\begin{bmatrix}
1 & 2
\end{bmatrix}
\cdot
\begin{bmatrix}
10 & 20
\end{bmatrix}
=
1 \cdot 10 + 2 \cdot 20 = 50
\\]
Comment Source:It will prove convenient to express the dot product in a form where its left input is a row vector, and its right input is a column vector.
So we would write:
\\[
\begin{bmatrix}
1 & 2
\end{bmatrix}
\cdot
\begin{bmatrix}
10 \\\\
20
\end{bmatrix}
=
1 \cdot 10 + 2 \cdot 20 =50
\\]
Matrix multiplication is an operation that takes two matrices for inputs, and outputs a product matrix.
We may write \(A \times B = C\), where the variables now stand for matrices.
If \(A\) is a row vector of length n, and \(B\) is column vector of length n, then the matrix multiplication \(A \cdot B\) is precisely defined to the dot product \(A \cdot B\) of \(A\) and \(B\).
The notation coincides; matrix multiplication is a strict generalization of the dot product, to the case of general matrices.
Comment Source:_Matrix multiplication_ is an operation that takes two matrices for inputs, and outputs a product matrix.
We may write \\(A \times B = C\\), where the variables now stand for matrices.
If \\(A\\) is a row vector of length n, and \\(B\\) is column vector of length n, then the matrix multiplication \\(A \cdot B\\) is precisely defined to the dot product \\(A \cdot B\\) of \\(A\\) and \\(B\\).
The notation coincides; matrix multiplication is a strict generalization of the dot product, to the case of general matrices.
Now there is a compatibility condition on the matrix product \(A \cdot B\), which causes this product to be defined only of the shapes of \(A\) and \(B\) are compatible.
Rather than just telling you the condition, here I'll explain how derive it from your understanding of the dot product.
Comment Source:Now there is a compatibility condition on the matrix product \\(A \cdot B\\), which causes this product to be defined only of the shapes of \\(A\\) and \\(B\\) are compatible.
Rather than just telling you the condition, here I'll explain how derive it from your understanding of the dot product.
Suppose \(A\) is row vector, and \(B\) is a column vector, and we wish to form their dot product \(A \cdot B\).
Now clearly this will only work if the number of columns in \(A\) equals the number of rows in \(B\).
And that is the general compatibility requirement for \(A\) and \(B\), in order for the product of \(A\) and \(B\) to be defined:
\[ncols(A) = nrows(B)\]
Comment Source:Suppose \\(A\\) is row vector, and \\(B\\) is a column vector, and we wish to form their dot product \\(A \cdot B\\).
Now clearly this will only work if the number of columns in \\(A\\) equals the number of rows in \\(B\\).
And _that_ is the general compatibility requirement for \\(A\\) and \\(B\\), in order for the product of \\(A\\) and \\(B\\) to be defined:
\\[ncols(A) = nrows(B)\\]
Say we want to multiply \(A\) and \(B\), and that \(ncols(A) = nrows(B) = k\).
Suppose that \(A\) has m rows, and \(B) has n columns.
So \(A\) is m-by-k, and \(B\) is k-by-n.
The key will be to picture \(A\) as a matrix of row-vectors, and \(B\) as a matrix of column vectors.
Comment Source:Say we want to multiply \\(A\\) and \\(B\\), and that \\(ncols(A) = nrows(B) = k\\).
Suppose that \\(A\\) has m rows, and \\(B) has n columns.
So \\(A\\) is m-by-k, and \\(B\\) is k-by-n.
The key will be to picture \\(A\\) as a matrix of row-vectors, and \\(B\\) as a matrix of column vectors.
Comment Source:The key is to picture \\(A\\) as a matrix of row-vectors and \\(B\\) as a matrix of column vectors.
Here are the rows of A:
\\[
A
=
\begin{bmatrix}
\text{---} & a_1 & \text{---} \\\\
\text{---} & a_2 & \text{---} \\\\
& \vdots & \\\\
\text{---} & a_m & \text{---}
\end{bmatrix}
\\]
Here are the columns of B:
\\[
B
=
\begin{bmatrix}
\vert & \vert & & \vert \\\\
b_1 & b_2 & ... & b_n \\\\
\vert & \vert & & \vert
\end{bmatrix}
\\]
Comments
Here is the transpose of that matrix:
\[ \begin{bmatrix} 1 & -10 \\ 2 & 0 \\ 3 & 7 \end{bmatrix} \]
Here is the _transpose_ of that matrix: \\[ \begin{bmatrix} 1 & -10 \\\\ 2 & 0 \\\\ 3 & 7 \end{bmatrix} \\]
The transpose turned a 2-by-3 matrix into a 3-by-2 matrix.
The transpose turns rows into columns and columns into rows.
You can picture it as a reflection of the matrix across a 45-degree axis going from top-left to bottom-right.
The transpose turned a 2-by-3 matrix into a 3-by-2 matrix. The transpose turns rows into columns and columns into rows. You can picture it as a reflection of the matrix across a 45-degree axis going from top-left to bottom-right.
If \(M\) is a matrix, then its transpose is written \(M^T\).
For example:
\[ \begin{bmatrix} 1 & 2 & 3 \\ -10 & 0 & 7 \end{bmatrix}^T = \begin{bmatrix} 1 & -10 \\ 2 & 0 \\ 3 & 7 \end{bmatrix} \]
If \\(M\\) is a matrix, then its transpose is written \\(M^T\\). For example: \\[ \begin{bmatrix} 1 & 2 & 3 \\\\ -10 & 0 & 7 \end{bmatrix}^T = \begin{bmatrix} 1 & -10 \\\\ 2 & 0 \\\\ 3 & 7 \end{bmatrix} \\]
Taking the transpose of the transpose gives you back the original matrix:
\[{(M^T)}^T = M\]
A row-vector is a matrix with just one row.
A column-vector is a matrix with just one column.
Taking the transpose of the transpose gives you back the original matrix: \\[{(M^T)}^T = M\\] A _row-vector_ is a matrix with just one row. A _column-vector_ is a matrix with just one column.
The transpose of a row vector is a column vector:
\[ \begin{bmatrix} 1 & 2 & 3 \end{bmatrix}^T = \begin{bmatrix} 1 \\ 2 \\ 3
\end{bmatrix} \]
The transpose of a row vector is a column vector: \\[ \begin{bmatrix} 1 & 2 & 3 \end{bmatrix}^T = \begin{bmatrix} 1 \\\\ 2 \\\\ 3 \end{bmatrix} \\]
And the transpose of a column vector is a row vector:
\[ \begin{bmatrix} 1 \\ 2 \\ 3
\end{bmatrix}^T = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \]
And the transpose of a column vector is a row vector: \\[ \begin{bmatrix} 1 \\\\ 2 \\\\ 3 \end{bmatrix}^T = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \\]
The dot product is an operation that takes two vectors in and outputs a single number (a scalar).
Here is how it works:
\[ \begin{bmatrix} 1 & 2 \end{bmatrix} \cdot \begin{bmatrix} 10 & 20 \end{bmatrix} = 1 \cdot 10 + 2 \cdot 20 = 50 \]
The _dot product_ is an operation that takes two vectors in and outputs a single number (a scalar). Here is how it works: \\[ \begin{bmatrix} 1 & 2 \end{bmatrix} \cdot \begin{bmatrix} 10 & 20 \end{bmatrix} = 1 \cdot 10 + 2 \cdot 20 = 50 \\]
It will prove convenient to express the dot product in a form where its left input is a row vector, and its right input is a column vector.
So we would write:
\[ \begin{bmatrix} 1 & 2 \end{bmatrix} \cdot \begin{bmatrix} 10 \\ 20 \end{bmatrix} = 1 \cdot 10 + 2 \cdot 20 =50 \]
It will prove convenient to express the dot product in a form where its left input is a row vector, and its right input is a column vector. So we would write: \\[ \begin{bmatrix} 1 & 2 \end{bmatrix} \cdot \begin{bmatrix} 10 \\\\ 20 \end{bmatrix} = 1 \cdot 10 + 2 \cdot 20 =50 \\]
Matrix multiplication is an operation that takes two matrices for inputs, and outputs a product matrix.
We may write \(A \times B = C\), where the variables now stand for matrices.
If \(A\) is a row vector of length n, and \(B\) is column vector of length n, then the matrix multiplication \(A \cdot B\) is precisely defined to the dot product \(A \cdot B\) of \(A\) and \(B\).
The notation coincides; matrix multiplication is a strict generalization of the dot product, to the case of general matrices.
_Matrix multiplication_ is an operation that takes two matrices for inputs, and outputs a product matrix. We may write \\(A \times B = C\\), where the variables now stand for matrices. If \\(A\\) is a row vector of length n, and \\(B\\) is column vector of length n, then the matrix multiplication \\(A \cdot B\\) is precisely defined to the dot product \\(A \cdot B\\) of \\(A\\) and \\(B\\). The notation coincides; matrix multiplication is a strict generalization of the dot product, to the case of general matrices.
Now there is a compatibility condition on the matrix product \(A \cdot B\), which causes this product to be defined only of the shapes of \(A\) and \(B\) are compatible.
Rather than just telling you the condition, here I'll explain how derive it from your understanding of the dot product.
Now there is a compatibility condition on the matrix product \\(A \cdot B\\), which causes this product to be defined only of the shapes of \\(A\\) and \\(B\\) are compatible. Rather than just telling you the condition, here I'll explain how derive it from your understanding of the dot product.
Suppose \(A\) is row vector, and \(B\) is a column vector, and we wish to form their dot product \(A \cdot B\).
Now clearly this will only work if the number of columns in \(A\) equals the number of rows in \(B\).
And that is the general compatibility requirement for \(A\) and \(B\), in order for the product of \(A\) and \(B\) to be defined:
\[ncols(A) = nrows(B)\]
Suppose \\(A\\) is row vector, and \\(B\\) is a column vector, and we wish to form their dot product \\(A \cdot B\\). Now clearly this will only work if the number of columns in \\(A\\) equals the number of rows in \\(B\\). And _that_ is the general compatibility requirement for \\(A\\) and \\(B\\), in order for the product of \\(A\\) and \\(B\\) to be defined: \\[ncols(A) = nrows(B)\\]
Now we'll define matrix multiplication, in general, by bootstrapping from the concept of dot products.
Now we'll define matrix multiplication, in general, by bootstrapping from the concept of dot products.
Say we want to multiply \(A\) and \(B\), and that \(ncols(A) = nrows(B) = k\).
Suppose that \(A\) has m rows, and \(B) has n columns.
So \(A\) is m-by-k, and \(B\) is k-by-n.
The key will be to picture \(A\) as a matrix of row-vectors, and \(B\) as a matrix of column vectors.
Say we want to multiply \\(A\\) and \\(B\\), and that \\(ncols(A) = nrows(B) = k\\). Suppose that \\(A\\) has m rows, and \\(B) has n columns. So \\(A\\) is m-by-k, and \\(B\\) is k-by-n. The key will be to picture \\(A\\) as a matrix of row-vectors, and \\(B\\) as a matrix of column vectors.
The key is to picture \(A\) as a matrix of row-vectors and \(B\) as a matrix of column vectors.
Here are the rows of A:
\[ A = \begin{bmatrix} \text{---} & a_1 & \text{---} \\ \text{---} & a_2 & \text{---} \\ & \vdots & \\ \text{---} & a_m & \text{---} \end{bmatrix} \]
Here are the columns of B:
\[ B = \begin{bmatrix} \vert & \vert & & \vert \\ b_1 & b_2 & ... & b_n \\ \vert & \vert & & \vert \end{bmatrix} \]
The key is to picture \\(A\\) as a matrix of row-vectors and \\(B\\) as a matrix of column vectors. Here are the rows of A: \\[ A = \begin{bmatrix} \text{---} & a_1 & \text{---} \\\\ \text{---} & a_2 & \text{---} \\\\ & \vdots & \\\\ \text{---} & a_m & \text{---} \end{bmatrix} \\] Here are the columns of B: \\[ B = \begin{bmatrix} \vert & \vert & & \vert \\\\ b_1 & b_2 & ... & b_n \\\\ \vert & \vert & & \vert \end{bmatrix} \\]
Then the product matrix \(A \cdot B\) consists of all possible dot products of a row from \(A\) with a column from \(B\):
\[ A \cdot B = \begin{bmatrix} \text{---} & a_1 & \text{---} \\ \text{---} & a_2 & \text{---} \\ & \vdots & \\ \text{---} & a_m & \text{---} \end{bmatrix} \cdot \begin{bmatrix} \vert & \vert & & \vert \\ b_1 & b_2 & ... & b_n \\ \vert & \vert & & \vert \end{bmatrix} = \begin{bmatrix} a_1 \cdot b_1 & a_1 \cdot b_2 & \text{---} & a_1 \cdot b_n \\ a_2 \cdot b_1 & a_2 \cdot b_2 & \text{---} & a_2 \cdot b_n \\ a_m \cdot b_1 & a_m \cdot b_2 & \text{---} & a_m \cdot b_n \end{bmatrix} \]
Then the product matrix \\(A \cdot B\\) consists of all possible dot products of a row from \\(A\\) with a column from \\(B\\): \\[ A \cdot B = \begin{bmatrix} \text{---} & a_1 & \text{---} \\\\ \text{---} & a_2 & \text{---} \\\\ & \vdots & \\\\ \text{---} & a_m & \text{---} \end{bmatrix} \cdot \begin{bmatrix} \vert & \vert & & \vert \\\\ b_1 & b_2 & ... & b_n \\\\ \vert & \vert & & \vert \end{bmatrix} = \begin{bmatrix} a_1 \cdot b_1 & a_1 \cdot b_2 & \text{---} & a_1 \cdot b_n \\\\ a_2 \cdot b_1 & a_2 \cdot b_2 & \text{---} & a_2 \cdot b_n \\\\ a_m \cdot b_1 & a_m \cdot b_2 & \text{---} & a_m \cdot b_n \end{bmatrix} \\]
Let's work through an example.
Let's work through an example.
Suppose \(A\) is 3-by-2:
\[ \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{bmatrix} \]
And \(B\) is 2-by-4:
\[ \begin{bmatrix} 10 & 20 & 30 & 40 \\ 50 & 60 & 70 & 80 \end{bmatrix} \]
Suppose \\(A\\) is 3-by-2: \\[ \begin{bmatrix} 1 & 2 \\\\ 3 & 4 \\\\ 5 & 6 \end{bmatrix} \\] And \\(B\\) is 2-by-4: \\[ \begin{bmatrix} 10 & 20 & 30 & 40 \\\\ 50 & 60 & 70 & 80 \end{bmatrix} \\]
We can form the product \(A \cdot B\), because:
\[ncols(A) = nrows(B) = 2\]
We can form the product \\(A \cdot B\\), because: \\[ncols(A) = nrows(B) = 2\\]
Here is \(A\) in row format:
\[ A = \begin{bmatrix} \begin{bmatrix} 1 & 2 \end{bmatrix} \\ \begin{bmatrix} 3 & 4 \end{bmatrix} \\ \begin{bmatrix} 5 & 6 \end{bmatrix} \end{bmatrix} \]
And \(B\) in column format:
\[ B = \begin{bmatrix} \begin{bmatrix} 10 \\ 50 \end{bmatrix} && \begin{bmatrix} 20 \\ 60 \end{bmatrix} && \begin{bmatrix} 30 \\ 70 \end{bmatrix} && \begin{bmatrix} 40 \\ 80 \end{bmatrix} \end{bmatrix} \]
Here is \\(A\\) in row format: \\[ A = \begin{bmatrix} \begin{bmatrix} 1 & 2 \end{bmatrix} \\\\ \begin{bmatrix} 3 & 4 \end{bmatrix} \\\\ \begin{bmatrix} 5 & 6 \end{bmatrix} \end{bmatrix} \\] And \\(B\\) in column format: \\[ B = \begin{bmatrix} \begin{bmatrix} 10 \\\\ 50 \end{bmatrix} && \begin{bmatrix} 20 \\\\ 60 \end{bmatrix} && \begin{bmatrix} 30 \\\\ 70 \end{bmatrix} && \begin{bmatrix} 40 \\\\ 80 \end{bmatrix} \end{bmatrix} \\]
So we have row vectors \(a_1 = \begin{bmatrix} 1 & 2 \end{bmatrix}\), \(a_2 = \begin{bmatrix} 3 & 4 \end{bmatrix}\), \(a_3 = \begin{bmatrix} 5 & 6 \end{bmatrix}\),
and column vectors \(b_1 = \begin{bmatrix} 10 \\ 50 \end{bmatrix} \), \(b_2 = \begin{bmatrix} 20 \\ 60 \end{bmatrix} \), \(b_3 = \begin{bmatrix} 30 \\ 70 \end{bmatrix} \), \(b_4 = \begin{bmatrix} 30 \\ 80 \end{bmatrix} \).
So the product matrix \(A \cdot B\) is the 3-by-4 matrix of dot products \(a_i \cdot b_j\).
So we have row vectors \\(a_1 = \begin{bmatrix} 1 & 2 \end{bmatrix}\\), \\(a_2 = \begin{bmatrix} 3 & 4 \end{bmatrix}\\), \\(a_3 = \begin{bmatrix} 5 & 6 \end{bmatrix}\\), and column vectors \\(b_1 = \begin{bmatrix} 10 \\\\ 50 \end{bmatrix} \\), \\(b_2 = \begin{bmatrix} 20 \\\\ 60 \end{bmatrix} \\), \\(b_3 = \begin{bmatrix} 30 \\\\ 70 \end{bmatrix} \\), \\(b_4 = \begin{bmatrix} 30 \\\\ 80 \end{bmatrix} \\). So the product matrix \\(A \cdot B\\) is the 3-by-4 matrix of dot products \\(a_i \cdot b_j\\).
\[ A \cdot B = \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{bmatrix} \cdot \begin{bmatrix} 10 & 20 & 30 & 40 \\ 50 & 60 & 70 & 80 \end{bmatrix} = \begin{bmatrix} 110 & 140 & 170 & 200 \\ 230 & 300 & 370 & 440 \\ 350 & 460 & 570 & 680 \end{bmatrix} = \begin{bmatrix} a_1 \cdot b_1 & a_1 \cdot b_2 & a_1 \cdot b_3 & a_1 \cdot b_4 \\ a_2 \cdot b_1 & a_2 \cdot b_2 & a_2 \cdot b_3 & a_2 \cdot b_4 \\ a_3 \cdot b_1 & a_3 \cdot b_2 & a_3 \cdot b_3 & a_3 \cdot b_4 \end{bmatrix} \]
\\[ A \cdot B = \begin{bmatrix} 1 & 2 \\\\ 3 & 4 \\\\ 5 & 6 \end{bmatrix} \cdot \begin{bmatrix} 10 & 20 & 30 & 40 \\\\ 50 & 60 & 70 & 80 \end{bmatrix} = \begin{bmatrix} 110 & 140 & 170 & 200 \\\\ 230 & 300 & 370 & 440 \\\\ 350 & 460 & 570 & 680 \end{bmatrix} = \begin{bmatrix} a_1 \cdot b_1 & a_1 \cdot b_2 & a_1 \cdot b_3 & a_1 \cdot b_4 \\\\ a_2 \cdot b_1 & a_2 \cdot b_2 & a_2 \cdot b_3 & a_2 \cdot b_4 \\\\ a_3 \cdot b_1 & a_3 \cdot b_2 & a_3 \cdot b_3 & a_3 \cdot b_4 \end{bmatrix} \\]
.
Prev: Numbers and vectors
. * * * [Prev: Numbers and vectors](https://forum.azimuthproject.org/discussion/2475/section1-linear-algebra-numbers-and-vectors-tanzer-trail1-post1)