samyyc.dev
LOC::Macau, China

..UTC+8

samyyc.dev

-- BPM

Wed May 22 2024

Linear Algebra Basics Notes

#107

/

samyyc

/

458 words

/

Updated 188 days ago

/

[中文]

Scalars, Vectors, Matrices, and Tensors

Scalar: a single number (a zero-dimensional array).

Vector: an ordered sequence of scalars (a one-dimensional array, an extension of scalars).

Matrix: a vector whose scalars are replaced by vectors (a two-dimensional array, an extension in dimensionality).

Tensor: a higher-order matrix (a three-dimensional or higher-dimensional array; more complex and less intuitive).

Norms and Inner Products

Norms

Norm: a measure of the size of a single vector.

L_p Norm

The general L_p norm is defined as: Lp(x⃗)=∣∣x⃗∣∣p=(∑i=1n∣xi∣p)1pL_p(\vec{x}) = ||\vec{x}||_p = (\sum\limits^{n}_{i=1}|x_i|^p)^\frac{1}{p}

L0L_0 norm: ∣∣x⃗∣∣0=∑i=1n[xi≠0]||\vec{x}||_0 = \sum\limits^{n}_{i=1}[x_i\ne0], that is, the number of all x_i that are not equal to zero.

L1L_1 norm: ∣∣x⃗∣∣1=∑i=1n∣xi∣||\vec{x}||_1 = \sum\limits^{n}_{i=1}|x_i|, that is, the sum of the absolute values of the vector's components, also known as Manhattan distance.

L2L_2 norm: ∣∣x⃗∣∣2=∑i=1n∣xi∣2||\vec{x}||_2 = \sqrt{\sum\limits^{n}_{i=1}|x_i|^2}, that is, Euclidean distance.

L∞L_{\infty} norm: ∣∣x⃗∣∣=lim⁡p→+∞(∑i=1n∣xi∣p)1p=max⁡i∣xi∣||\vec{x}|| = \lim\limits_{p\rarr+\infty}(\sum\limits^{n}_{i=1}|x_i|^p)^\frac{1}{p} = \max\limits_{i}|x_i|, that is, the infinity norm or maximum norm, taking the maximum absolute value among all elements in the vector, also known as Chebyshev distance.

Inner Product

Inner product: a description of the relationship between two vectors.

The inner product of two vectors with the same dimensions: ⟨x,y⟩=∑i=1nxi⋅yi\langle x,y\rangle = \sum\limits^{n}_{i=1}x_i\cdot y_i

Special case: when the inner product is 0, the two vectors are perpendicular in two-dimensional space. In higher-dimensional spaces, the two vectors are said to be orthogonal. If two vectors are orthogonal, that means they are linearly independent.

Linear Spaces

If there is a set whose elements are all vectors of the same dimensionality (whether finitely many or infinitely many), and structured operations such as addition and scalar multiplication are defined on it, then such a set is called a linear space. A linear space with an inner product operation defined is called an inner product space.

In a linear space, any vector represents a point in n-dimensional space; conversely, any point in the space can also be uniquely represented by a vector.

Orthogonal Basis

In an inner product space, a set of pairwise orthogonal vectors forms an orthogonal basis for that space. If the L_2 norm of every basis vector in the orthogonal basis is unit length 1, then this set of orthogonal basis vectors is an orthonormal basis.

The orthogonal basis that describes an inner product space is not unique. For two-dimensional space, the rectangular coordinate system and the polar coordinate system correspond to two different sets of orthogonal bases, and they also represent two practical ways of description.