<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Matrices on My Blog</title><link>https://EMEEEEMMMM.github.io/tags/matrices/</link><description>Recent content in Matrices on My Blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sat, 04 Apr 2026 11:47:35 +0800</lastBuildDate><atom:link href="https://EMEEEEMMMM.github.io/tags/matrices/index.xml" rel="self" type="application/rss+xml"/><item><title>Foundations of Vectors And Matrices</title><link>https://EMEEEEMMMM.github.io/posts/foundationsofvectorsandmatrices/</link><pubDate>Sat, 04 Apr 2026 11:47:35 +0800</pubDate><guid>https://EMEEEEMMMM.github.io/posts/foundationsofvectorsandmatrices/</guid><description>&lt;img src="https://EMEEEEMMMM.github.io/" alt="Featured image of post Foundations of Vectors And Matrices" /&gt;&lt;h1 id="vectors-and-matrices"&gt;Vectors And Matrices
&lt;/h1&gt;&lt;p&gt;Vectors and matrices are the fundamental elements in the engine. They are capable for so many things and act important roles in different areas. I&amp;rsquo;m going to introduce some properties about them from a mathematical way.&lt;/p&gt;
&lt;h2 id="vectors"&gt;Vectors
&lt;/h2&gt;&lt;h3 id="definition-of-a-vector"&gt;Definition of a Vector:
&lt;/h3&gt;&lt;p&gt;A vector possesses &lt;strong&gt;magnitude&lt;/strong&gt; (its size or length) and &lt;strong&gt;direction&lt;/strong&gt;. Unlike a scalar quantity, which is defined only by its magnitude, a vector requires both a value and an orientation in the space to be fully described.&lt;/p&gt;
&lt;p&gt;In an $n$ dimensional space, a vector can be represented as:
&lt;/p&gt;
$$
\vec{v} = \begin{pmatrix} v_{1} \\ v_{2} \\ v_{3} \\ \vdots \\ v_{n} \end{pmatrix}
$$&lt;p&gt;Its magnitude can be expressed as:
&lt;/p&gt;
$$
\lVert \vec{v}\rVert = \sqrt{v_{1}^{2} + v_{2}^{2} + v_{3}^{2} + \dots + v_{n}^{2}} = \sqrt{\sum_{i=1}^n v_{i}^{2}}
$$&lt;p&gt;Its direction can be expressed by its unit vector:
&lt;/p&gt;
$$
\hat{v} = \frac{\vec{v}}{\lVert \vec{v} \rVert} = \begin{pmatrix} \frac{v_{1}}{\lVert \vec{v} \rVert} \\ \frac{v_{2}}{\lVert \vec{v} \rVert} \\ \frac{v_{3}}{\lVert \vec{v} \rVert} \\ \vdots \\ \frac{v_{n}}{\lVert \vec{v} \rVert} \end{pmatrix}
$$&lt;h3 id="vector-properties"&gt;Vector Properties:
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;Commutativity of Addition: $\vec{u} + \vec{v} = \vec{v} + \vec{u}$&lt;/li&gt;
&lt;li&gt;Associativity of Addition: $(\vec{u} + \vec{v}) + \vec{w} = \vec{u} + (\vec{v} + \vec{u})$&lt;/li&gt;
&lt;li&gt;Distributivity: $c(\vec{u} + \vec{v}) = c\vec{u} + c\vec{v}$&lt;/li&gt;
&lt;li&gt;Zero Vector: There exists a unique zero vector $\vec{0} = \left( 0, 0, \dots, 0 \right)$ such that $\vec{v} + \vec{0} = \vec{v}$.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="vector-operations"&gt;Vector Operations:
&lt;/h3&gt;&lt;h4 id="addition--subtraction"&gt;Addition &amp;amp; Subtraction:
&lt;/h4&gt;&lt;p&gt;The sum of two vectors $\vec{v}$ and $\vec{u}$ can be visualized by using the &lt;strong&gt;Triangle Law&lt;/strong&gt; or the &lt;strong&gt;Parallelogram Law&lt;/strong&gt;:
&lt;img alt="alt text" class="gallery-image" data-flex-basis="461px" data-flex-grow="192" height="402" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://EMEEEEMMMM.github.io/posts/foundationsofvectorsandmatrices/VectorSum.jpg" width="773"&gt;
Subtraction can also use these two method by adding the negative vectors.&lt;/p&gt;
&lt;h4 id="the-dot-product"&gt;The Dot Product:
&lt;/h4&gt;&lt;p&gt;The dot product of two vectors $\vec{v}$ and ${\vec{u}}$ results in a scalar which can be used in countless areas. It is crucial for determining the angle between the vectors.
&lt;strong&gt;Geometric Interpretation&lt;/strong&gt;:
&lt;/p&gt;
$$
\vec{v} \cdot \vec{u} = \lVert \vec{v} \rVert \lVert \vec{u} \rVert \cos(\theta)
$$&lt;p&gt;
Here $\theta$ is the angle between $\vec{v}$ and $\vec{u}$.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algebraic Definition&lt;/strong&gt;:
&lt;/p&gt;
$$
\vec{v} \cdot \vec{u} = v_{1} \cdot u_{1} + v_{2} \cdot u_{2} + \dots + v_{n} \cdot u_{n} = \Sigma_{i = 1}^{n} v_{i} u_{i}
$$&lt;p&gt;&lt;strong&gt;Derivation&lt;/strong&gt;:
Consider the dot product in 3 dimensional space where any two vectors can be expressed as $\vec{v}=(x_{1}, y_{1}, z_{1})$ and $\vec{u}=(x_{2}, y_{2}, z_{2})$. The orthonormal basis in the space have these properties:
&lt;/p&gt;
$$
\begin{aligned}
 \hat i \cdot \hat i = \hat j \cdot \hat j = \hat k \cdot \hat k = 1 \\
 \hat i \cdot \hat j = \hat i \cdot \hat k = \hat j \cdot \hat k = 0
\end{aligned}
$$&lt;p&gt;
The two vectors can then be expressed as:
&lt;/p&gt;
$$
\begin{aligned}
 \vec{v} = \begin{bmatrix}
 x_{1} \hat i \\ 
 y_{1} \hat j \\
 z_{1} \hat k
 \end{bmatrix}
 \vec{u} = \begin{bmatrix}
 x_{2} \hat i \\ 
 y_{2} \hat j \\
 z_{2} \hat k
 \end{bmatrix}
\end{aligned}
$$&lt;p&gt;So, we have:
&lt;/p&gt;
$$
\begin{split}
\vec{v} \cdot \vec{u}
&amp;= (x_{1} \hat i + y_{1} \hat j + z_{1} \hat k) \cdot (x_{2} \hat i + y_{2} \hat j + z_{2} \hat k) \\
&amp;= x_{1} x_{2} \hat i \cdot \hat i + x_{1} y_{2} \hat i \cdot \hat j + x_{1} z_{2} \hat i \cdot \hat k + \\
&amp; \phantom{=} y_{1} x_{2} \hat j \cdot \hat i + y_{1} y_{2} \hat j \cdot \hat j + y_{1} z_{2} \hat j \cdot \hat k + \\
&amp; \phantom{=} z_{1} x_{2} \hat k \cdot \hat i + z_{1} y_{2} \hat k \cdot \hat j + z_{1} z_{2} \hat k \cdot \hat k \\
&amp;= x_{1} x_{2} \hat i \cdot \hat i + y_{1} y_{2} \hat j \cdot \hat j + z_{1} z_{2} \hat k \cdot \hat k \\
&amp;= x_{1} x_{2} + y_{1} y_{2} + z_{1} z_{2}
\end{split}
$$&lt;p&gt;Here is a handwriten note to help you understand.
&lt;img alt="alt text" class="gallery-image" data-flex-basis="598px" data-flex-grow="249" height="597" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://EMEEEEMMMM.github.io/posts/foundationsofvectorsandmatrices/DotProduct.jpg" srcset="https://EMEEEEMMMM.github.io/posts/foundationsofvectorsandmatrices/DotProduct_hu_447af0425b46f82.jpg 800w, https://EMEEEEMMMM.github.io/posts/foundationsofvectorsandmatrices/DotProduct.jpg 1489w" width="1489"&gt;&lt;/p&gt;
&lt;p&gt;From the geometric definition, we can derive the relationship for the angle:
&lt;/p&gt;
$$
\cos(\theta) = \frac{\vec{v} \cdot \vec{u}}{\lVert \vec{v} \rVert \lVert \vec{u} \rVert}
$$&lt;p&gt;If $\vec{v} \cdot \vec{u} &amp;gt; 0$, the angle $\theta$ is actue ($0 \leq \theta &amp;lt; \frac{\pi}{2}$).
If $\vec{v} \cdot \vec{u} = 0$, the angle $\theta = \frac{\pi}{2}$, meaning the vectors are perpendicular to each other.
If $\vec{v} \cdot \vec{u} &amp;lt; 0$, the angle $\theta$ is obtuse ($\frac{\pi}{2} &amp;lt; \theta \leq \pi$).&lt;/p&gt;
&lt;h4 id="the-cross-product"&gt;The Cross Product:
&lt;/h4&gt;&lt;p&gt;The cross product is only defined for vectors in three-dimensional space.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Geometric Interpretation&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Direction: The resulting vector $\vec{v} = \vec{u} \times \vec{w}$ is perpendicular to the plane spanned by $\vec{u}$ and $\vec{w}$. The direction of $\vec{v}$ is determined by the &lt;strong&gt;right-hand rule&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Magnitude: The magnitude of the resulting vector is given by:

$$
\lVert \vec{u} \times \vec{w} \rVert = \lVert \vec{u} \rVert \lVert \vec{w} \rVert \sin(\theta)
$$&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Special Cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parallel Vectors ($\theta = 0 \enspace or \enspace \pi$): $\sin(\theta)=0$, so $\vec{u} \times \vec{w} = 0$. (The Zero Vector)&lt;/li&gt;
&lt;li&gt;Orthogonal Vectors($\theta = \frac{\pi}{2}$): $\sin(\frac{\pi}{2}) = 1$, so $\lVert \vec{u} \times \vec{w} \rVert = \lVert \vec{u} \rVert \lVert \vec{w} \rVert$. The resulting vector is the largest possible magnitude for the given lengths.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Algebraic Interpretation&lt;/strong&gt;:
For vectors $a=(a_{x},a_{y},a_{z})$, $b=(b_{x},b_{y},b_{z})$, $\hat i, \hat j, \hat k$ is unit vectors for x, y, z respectively(orthonormal basis). We have:
&lt;/p&gt;
$$
\vec{a} \times \vec{b} = \begin{vmatrix}
 i &amp; j &amp; k \\
 a_{x} &amp; a_{y} &amp; a_{z} \\
 b_{x} &amp; b_{y} &amp; b_{z}
\end{vmatrix} = (a_{y} b_{z} - a_{z} b_{y}) \hat i + (a_{z} b_{x} - a_{x} b_{z}) \hat j + (a_{x} b_{y} - a_{y} b_{x}) \hat k
$$&lt;p&gt;In coordinate form:
&lt;/p&gt;
$$
\vec{a} \times \vec{b} = (a_{x}, a_{y}, a_{z}) \times (b_{x}, b_{y}, b_{z}) = (a_{y} b_{z} - a_{z} b_{y}, a_{z} b_{x} - a_{x} b_{z}, a_{x} b_{y} - a_{y} b_{x})
$$&lt;p&gt;&lt;strong&gt;Derivation&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;For the unit vectors $\hat i, \hat j, \hat k$, they have the following properties:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;$\hat i \times \hat j = \hat k, \hat j \times \hat k = \hat i, \hat k \times \hat i = \hat j$&lt;/li&gt;
&lt;li&gt;$\hat j \times \hat i = - \hat k, \hat k \times \hat j = - \hat i, \hat i \times \hat k = - \hat j$&lt;/li&gt;
&lt;li&gt;$\hat i \times \hat i = \hat j \times \hat j = \hat k \times \hat k = 0$&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For $\vec{u}$ and $\vec{v}$ which are in the coordinate system consisting of $\hat i, \hat j, \hat k$ can be expressed as:
&lt;/p&gt;
$$
\begin{aligned}
 \vec{u} = x_{u} \hat i + y_{u} \hat j + z_{u} \hat k \\
 \vec{v} = x_{v} \hat i + y_{v} \hat j + z_{v} \hat k \\
\end{aligned}
$$&lt;p&gt;Then calculate $\vec{u} \times \vec{v}$:
&lt;/p&gt;
$$
\begin{split}
\vec{u} \times \vec{v}
&amp;= (x_{u} \hat i + y_{u} \hat j + z_{u} \hat k) \times (x_{v} \hat i + y_{v} \hat j + z_{v} \hat k) \\
&amp;= x_{u} x_{v} (\hat i \times \hat i) + x_{u} y_{v} (\hat i \times \hat j) + x_{u} z_{v} (\hat i \times \hat k) + \\
&amp; \phantom{=} y_{u} x_{v} (\hat j \times \hat i) + y_{u} y_{v} (\hat j \times \hat j) + y_{u} z_{v} (\hat j \times \hat k) + \\
&amp; \phantom{=} z_{u} x_{v} (\hat k \times \hat i) + z_{u} y_{v} (\hat k \times \hat j) + z_{u} z_{v} (\hat k \times \hat k) \\
&amp;= (y_{u} z_{v} - z_{u} y_{v}) \hat i + (z_{u} x_{v} - x_{u} z_{v}) \hat j + (x_{u} y_{v} - y_{u} x_{v}) \hat k
\end{split}
$$&lt;h2 id="matrices"&gt;Matrices
&lt;/h2&gt;&lt;p&gt;Matrices is a set of numbers in a rectangular array.&lt;/p&gt;
&lt;p&gt;A table of numbers in $m$ rows and $n$ columns arranged by $m \times n$ numbers is called a $m \times n$ matrix. Denoted as:&lt;/p&gt;
$$
A = \begin{bmatrix}
 a_{11} &amp; a_{12} &amp; \dots &amp; a_{1n} \\
 a_{21} &amp; a_{22} &amp; \dots &amp; a_{2n} \\
 \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
 a_{m1} &amp; a_{m2} &amp; \dots &amp; a_{mn}
\end{bmatrix}
$$&lt;h3 id="matrix-operations"&gt;Matrix Operations:
&lt;/h3&gt;&lt;h4 id="addition--subtraction-1"&gt;Addition &amp;amp; Subtraction:
&lt;/h4&gt;$$
\begin{bmatrix}
 a_{11} &amp; a_{12} &amp; \dots &amp; a_{1n} \\
 a_{21} &amp; a_{22} &amp; \dots &amp; a_{2n} \\
 \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
 a_{m1} &amp; a_{m2} &amp; \dots &amp; a_{mn}
\end{bmatrix} + 
\begin{bmatrix}
 b_{11} &amp; b_{12} &amp; \dots &amp; b_{1n} \\
 b_{21} &amp; b_{22} &amp; \dots &amp; b_{2n} \\
 \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
 b_{m1} &amp; b_{m2} &amp; \dots &amp; b_{mn}
\end{bmatrix} = 
\begin{bmatrix}
 a_{11} + b_{11} &amp; a_{12} + b_{12} &amp; \dots &amp; a_{1n} + b_{1n} \\
 a_{21} + b_{21} &amp; a_{22} + b_{22} &amp; \dots &amp; a_{2n} + b_{2n} \\
 \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
 a_{m1} + b_{m1} &amp; a_{m2} + b_{m2} &amp; \dots &amp; a_{mn} + b_{mn}
\end{bmatrix}
$$&lt;p&gt;Addition of matrices satisfies the following operator laws:
&lt;/p&gt;
$$
\begin{align}
 A + B &amp;= B + A \\
 (A + B) + C &amp;= A + (B + C)
\end{align}
$$&lt;h4 id="scalar-multiplication"&gt;Scalar Multiplication:
&lt;/h4&gt;$$
k \cdot
\begin{bmatrix}
 a_{11} &amp; a_{12} &amp; \dots &amp; a_{1n} \\
 a_{21} &amp; a_{22} &amp; \dots &amp; a_{2n} \\
 \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
 a_{m1} &amp; a_{m2} &amp; \dots &amp; a_{mn}
\end{bmatrix} =
\begin{bmatrix}
 k \cdot a_{11} &amp; k \cdot a_{12} &amp; \dots &amp; k \cdot a_{1n} \\
 k \cdot a_{21} &amp; k \cdot a_{22} &amp; \dots &amp; k \cdot a_{2n} \\
 \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
 k \cdot a_{m1} &amp; k \cdot a_{m2} &amp; \dots &amp; k \cdot a_{mn}
\end{bmatrix}
$$&lt;p&gt;The scalar multiplication of a matrix satisfies the following operator laws:
&lt;/p&gt;
$$
\begin{aligned}
 \lambda(\mu A) &amp;= \mu(\lambda A) \\ 
 \lambda(\mu A) &amp;= (\lambda \mu) A \\ 
 (\lambda + \mu) A &amp;= \lambda A + \mu A \\
 \lambda(A + B) &amp;= \lambda A + \lambda B 
\end{aligned}
$$&lt;h4 id="transpose"&gt;Transpose:
&lt;/h4&gt;&lt;p&gt;The matrix resulting from interchanging the rows and the columns of the matrix A is called the transposed matrix of A ($A^T$)
&lt;/p&gt;
$$
\begin{bmatrix}
 a_{11} &amp; a_{12} &amp; a_{13} \\
 a_{21} &amp; a_{22} &amp; a_{23} \\
\end{bmatrix} ^ T = \begin{bmatrix}
 a_{11} &amp; a_{21} \\
 a_{12} &amp; a_{22} \\
 a_{13} &amp; a_{23}
\end{bmatrix}
$$&lt;p&gt;The transpose of a matrix satisifes the following operator laws:
&lt;/p&gt;
$$
\begin{align}
 (A^T)^T &amp;= A \\
 (\lambda A)^T &amp;= \lambda A^T \\
 (AB)^T &amp;= B^T A^T 
\end{align}
$$&lt;h4 id="multiplication"&gt;Multiplication:
&lt;/h4&gt;&lt;p&gt;If $A$ is a $m \times n$ matrix and $B$ is a $n \times p$ matrix, their product $C$ is a $m \times p$ matrix $C = (c_{ij})$, any of its element can be expressed as:
&lt;/p&gt;
$$
c_{i,j} = a_{i,1}b_{1,j} + a_{i,2}b_{2,j} + \cdots + a_{i,n}b_{n,j} = \Sigma_{r=1}^n a_{i,r}b{r,j}
$$&lt;p&gt;
This product can be denoted as: $C = AB$&lt;/p&gt;
&lt;p&gt;The multiplication of matrices satisfies following operators:
&lt;/p&gt;
$$
\begin{align}
 (AB)C = A(BC) \\
 (A+B)C = AC + BC \\
 C(A+B) = CA + CB
\end{align}
$$</description></item></channel></rss>