Skip to content

MATH 115: Linear Algebra

Set theory

Definition

  • Natural numbers () are all integers greater than zero.
  • Integers () are all non-decimal numbers.
  • Rational numbers () are all numbers representable as a fraction.
  • Irrational numbers are all real numbers not representable as a fraction.
  • Real numbers () are all rational or irrational numbers.

The subset sign () indicates that one set is strictly within another. The not subset sign () indicates that at least one element in the first set is not in the second.

Example

  • Natural numbers are a subset of integers, or .
  • Integers are not a subset of natural numbers, or .

Warning

The subset sign is not to be confused with the element of sign (), as the former only applies to sets while the latter only applies to elements.

Sets can be subtracted with a backslash (\), returning a set with all elements in the first set not in the second.

Example

The set of irrational numbers can be represented as the difference between the real and rational number sets, or:

Complex numbers

A complex number can be represented in the form:

where and are real numbers, and is the imaginary (also known as outside of engineering). This implies that every real number is also in the set of complex numbers as can be set to zero.

Definition

  • is the real component of complex number .
  • is the imaginary component of complex number .

These numbers can be treated effectively like any other number.

Properties of complex numbers

All of these properties can be derived from expanding the standard forms.

Where and :

Example

If and :

Example

To solve for in :

Example

To solve for in :

Conjugates

The conjugate of any number can be written with a bar above it.

The conjugate of a conjugate is the original number.

is a real number if and only if its conjugate is itself.

is purely imaginary if and only if its conjugate is the negative version of itself.

Conjugates are flexible and can almost be treated as just another factor.

Modulus

The modulus of a number is represented by the absolute value sign. It is equal to its magnitude if the complex number were a vector.

Example

The modulus of complex number is:

If there is no imaginary component, a complex number's modulus is its absolute value.

Complex numbers cannot be directly compared because imaginary numbers have no inequalities, but their moduli can — the modulus of one complex number can be greater than another's.

Properties of moduli

These can be also be manually derived.

If the modulus is zero, the complex number is zero.

The modulus of the conjugate is equal to the modulus of the original.

The number multiplied by the conjugate is the square of the modulus.

Moduli are also almost just a factor:

The moduli of the sum is always less than the sum of the moduli of the individual numbers — this is also known as the triangle inequality theorem.

Geometry

In setting the x- and y-axes to the imaginary and real components of a complex number, complex numbers can be represented almost as vectors.

(Source: Wikimedia Commons, GNU FGL 1.2 or later)

The complex number will be on the point , and the modulus is the magnitude of the vector. Complex number moduli can be compared graphically if their points lie within a drawn circle centred on the origin with a point on another vector.

Polar form

The variable is equal to the modulus of a complex number .

From the Pythagorean theorem, the polar form of a complex number can be expressed using the angle of the modulus to the real axis. Where is the angle of the modulus to the real axis:

Trigonometry can be used to calculate and as and .

Example

Warning

The polar form is not unique because going around 360° results in the same vector. Where is any integer.

The polar form is useful for the multiplication of complex numbers.

Because of the angle sum identities:

This can be extrapolated into Moivre's theorem:

To determine the roots of a complex number, Moivre's theorem can be used again:

where is every number in the range .

Example

To find all answers for :

The exponential form of a complex number employs Euler's identity:

Proofs

Example

Vectors

Please see SL Math - Analysis and Approaches 2#Vectors and SL Physics 1#1.3 - Vectors and scalars for more information.

The column vector shows a vector of the form from top to bottom as as the number of dimensions increases.

The zero vector is full of zeroes.

Warning

Vectors of different dimensions cannot be compared — the missing dimensions cannot be treated as 0.

The standard form of a vector is written as the difference between two points: where is the origin and is any point. is the vector as a difference between two points.

If a vector can be expressed as the sum of a scalar multiple of other vectors, that vector is the linear combination of those vectors. Formally, is a linear combination of if and only if any real constant(s) multiplied by each vector return :

The norm of a vector is its magnitude or distance from the origin, represented by double absolute values. In and , the Pythagorean theorem can be used.

Properties of norms

Dot product

Please see SL Math - Analysis and Approaches 2#Dot product for more information.

The Cauchy-Schwartz inequality states that the magnitude of the dot product is less than the product.

The dot product can be used to guesstimate the angle between two vectors.

  • If , the angle is obtuse.
  • If , the angle is acute.

Complex vectors

The set of complex vectors is like but for complex numbers.

The norm of a complex vector must be a real number. Therefore:

The complex inner product is the dot product between a conjugate complex vector and a complex vector.

Properties of the complex inner product

Cross product

Please see SL Math - Analysis and Approaches 2#Cross product for more information.

Vector equations

Please see SL Math - Analysis and Approaches 2#Vector line equations in two dimensions for more information.

Vector planes

Please see SL Math - Analysis and Approaches 2#Vector planes for more information.

Definition

  • A hyperplane is an plane in an space.

The scalar equation of a vector shows the normal vector and a point on the plane which can be condensed into the constant .

Please see SL Math - Analysis and Approaches 2#Vector projections for more information.

Similarly, the component of in the direction perpendicular to is related to the vector projection.

Matrices

Please see SL Math - Analysis and Approaches 2#Matrices for more information.

Definition

  • A leading entry is the first non-zero entry in a row.
  • A matrix is underdetermined if there are fewer variables than rows.
  • A matrix is overdetermined if there are more variables than rows.

Vectors can be expressed as matrices with each dimension in its own row. If there is a contradiction in the system, it is inconsistent.

The row echelon form of a matrix makes a system rapidly solvable by effectively performing elimination on the system until it is nearly completed.

Example

The following is a vector in its row echelon form.

The reduced row echelon form of a matrix makes a system even more rapidly solvable by performing even more elimination on the system such that each leading variable is equal to one, and that variable is the only variable in the coefficient matrix.

The rank of a matrix is equal to the number of leading entries any row echelon form.

In general, represents just the coefficient matrix, while represents the augmented matrix.

According to the system-rank theorem, a system is consistent if and only if the ranks of the coefficient and augmented matrices are equal.

In addition, for resultant vectors with dimensions, the system is only consistent if

Each variable is a leading variable if there is a leading entry in . Otherwise, it is a free variable. Systems with free variables have infinite solutions and can be represented by a vector parameter.

Example

TODO: LEARN example

Matrix algebra

Definition

  • is the set of all real matrices.
  • A square matrix has .
  • The zero matrix has every entry equal to 0.

In a matrix , or represents the entry in the th row and th column.

Two matrices with size and are equal if and only if for every i and j (formally, for every ).

Properties of matrices include:

The matrix transpose is the matrix satisfying , as if it was reflected along the primary diagonal.

A matrix is symmetric if , implying a square matrix.

Properties of transposed matrices:

Matrix multiplication

In the two matrices and , where are columns:

where the resultant matrix is of size .

Extra columns in are ignored.

Alternatively, where is each row in :

Properties of matrix multiplication, where :

In an adjacency matrix, the number of paths between points in exactly edges is equal to that entry in .

Matrix-vector product

In an augmented matrix, the system is consistent if and only if the resultant vector is a linear combination of the columns of the coefficient matrix.

Where is and is the column vector of at :

Alternatively, the matrix-vector product can be considered a dot product such that where are the rows of :

Warning

  • must be .
  • must be in (number of columns)
  • must be in (number of rows)

Example

The system below:

is equivalent to the augmented matrix:

which is consistent if and only if, where are the column vectors of :

The matrix-vector product is distributive, so the following properties are true.

Identity matrices

In a homogeneous system (), any linear combinations of the solutions to the system () are also solutions to the system.

The identity matrix () is a square matrix of size with the value 1 along the main diagonal and 0 everywhere else. The th column is equal to the th row, which is known as .

Markov chains

Definition

  • A probability vector has only non-negative entries that sum to 1.
  • A stochastic matrix has only probability vectors as its columns.
  • A state vector in a Markov chain represents the state of the system.

A Markov chain is a sequence of probability vectors and stochastic matrix such that:

for any non-negative integer .

The state vector is the steady-state vector for if . Each stochastic matrix converges to a steady state.

If the stochastic matrix is regular, there are only positive integers, which is true if at some there are only positive integers. Regular matrices converge to exactly one steady state vector.

In order to determine the steady state for any stochastic cmatrix:

  • Verify that is regular,
  • Solve the augmented matrix .
  • Deduce the probability vector .

Matrix equality

Matrices are only equal if every possible linear combination is equal ( does not mean ).

If for every , then . This can be proven using the identity matrix:

Complex matrices

The conjugate of a matrix is the conjugate of each of its elements.

Conjugates are distributive, i.e. .

Matrix inversion

The unique inverse matrix of is such that . Both matrices must be square for this to work and have ranks equal to that of their length.

Properties of inverse matrices:

  • if

To determine an inverse matrix, the augmented matrix of it and the identity matrix should be solved.

If it is row reducible, it will form an identity matrix and the inverse on the other side.

If it is not row reducible or has free variables, it is not invertible.

If a matrix is invertible, is guaranteed to have a unique solution for any .

Flow

Definition

  • A network is a system of junctions connected by directed lines, similar to a directed graph.

In a junction, the flow in must equal the flow out. A network that follows the junction rule is at equilibrium.

In an electrical diagram, if a reference direction is selected, flow going opposite the reference direction is negative.

Matrices can be applied by applying the junction rule to systems with equal flow in and flow out for each of the smaller systems (i.e., not trying to meet every point)

Spanning sets

The span of a finite set of vectors in is the infinite set of all linear combinations of those vectors, such that Span is spanned by and is a spanning set for Span .

The set can be represented as matrix . A vector is in Span if and only if is consistent — which is to say that if it can be expressed as a linear combination, it is in the span.

Linear independence

A set is:

  • linearly dependent if at least one non-zero linear combination of the set is equal to .
  • linearly independent if the only solution is setting all coefficients to zero.

Effectively, if there is at least one vector in the set that is a linear combination of the other elements, it is redundant and thus the set is linearly dependent.

This can be solved by testing if there are no free variables in the homogeneous system — the vector that is free is the dependent one.

Warning

  • Any set with the zero vector will be an linearly dependent set.
  • The empty set is linearly independent.

Subsets can be proven to be dependent via contradiction.

Example

To prove is LI given is LI, assume that the former is LD, which results in the latter being LD, which cannot be true, therefore the proof holds.

Subspaces

A subset of is a subspace of if and only if:

  • all
  • for all

Bases

A basis of subspace is a set that is linearly independent such that the span of is equal to the subspace. All elements in that subspace must have a unique linear combination of the elements in , such that the rank of a matrix from the basis is always the number of vectors.

The basis of contains exactly elements, and all bases have the same number of elements.

The standard basis for is the set of identity matrix columns.

Therefore, a spanning set is only a basis under the following conditions:

  • it is linear independent
  • it has the same number of elements as a basis

Dimensions

The dimension of a subspace is equal to the number of elements in any of its bases.

Other spaces

The null space of a matrix is the set of all elements that solve the homogeneous system .

Its dimension is equal to the number of free vectors in RREF.

The column space of a matrix is the set of all linear combinations of its columns, which can be found by taking a linearly independent subset of the matrix (the original vectors of the non-free vectors in RREF).

Its dimension is equal to the rank of the matrix.

The row space of a matrix is the set of all linear combinations of its rows, which can be found by taking each non-zero row from RREF.

Its dimension is equal to the rank of the matrix.

Two row spaces are equal if and only if they can be manipulated into each other via elementary row operations. This indicates that systems to the homogeneous system for one apply to the other as well.

Vector spaces

A vector space over is a set defined by the linear combination of two or more vectors.

In a vector space, the following properties mmust be true:

Rules regarding dimensions, bases, subspaces, sets, and spanning sets all apply to vector spaces.

The standard basis for the vector space is:

The vector space over can have complex scalars but is otherwise the same as a vector space over .

Polynomial vector spaces

is the set of all possible real polynomials with a degree less than or equal to .

The zero polynomial is in all polynomials and is equal to zero with all coefficients set to zero.

For each , is a vector space within addition and scalar multiplication.

The standard basis for is equal to all coefficients set to 1, and its dimension is equal to its degree plus 1.

Matrix transformations

Definition

  • The codomain of a function is the set of all possible values in that axis / dimension.
  • The range of a function is the set of all possible values returnable by the function.

A matrix transformation function maps a vector to its matrix-vector product from to .

The matrix transformation function for matrix is directly equivalent to the matrix-vector product.

Example

Matrix transformation properties:

A matrix transformation function can be restored to its original vector by substituting in the standard basis as parameters.

Linear transformations

A matrix transformation function is a linear transformation if and only if for all:

A linear transformation is a line that passes through the origin. If the transformation does not change the dimension of the vector, the function is a linear operator. Matrix transformation preserve linear combinations — that is, every matrix transformation is a linear transformation.

Its standard matrix is equal to the original vector (found by substituting the identity matrix).

For all linear transformations:

Linear combinations preserve linear combinations, so a linear transformation of a subspace can be found if the linear transformations of the basis are known.

Reflections

Around a direction vector through the origin, a linear transformation can reflect about it, similar to a reflection across .

In , it is reflected across a plane, and the normal vector can be used as the direction vector.

Rotations

Where is a counterclockwise rotation about the origin by , is the norm of the vector, and is the original angle to the x-axis:

This effectively transforms the matrix to:

The inverse angle is just the matrix transpose.

Stretches and compressions

If , is a stretch in the direction. Otherwise, it is a compression in that direction.

If , is a dilation (stretch in both directions). Otherwise, it is a contraction.

If , is a rightward shear, bending a square into a right-facing parallelogram. Otherwise, if , it shears left.

For all linear and matrix transformations:

  • always is equal to

In :

  • or

Determinants and adjugates

The determinant does a lot of magic things and is commonly used in the cross product.

The inverse can be quickly found if and only if the determinant of the original matrix is non-zero:

The mini-matrix is equal to the matrix created by removing the th row and th column.

The th cofactor of is related to its one-indexed determinant, and its sign is determined by its position:

The determinant of an arbitrarily sized matrix can be found by recursively applying these formulae — for any row or column, the cofactor expansion along the th row or th column of can find the determinant:

The adjugate matrix is equal to the transpose of the cofactor matrix:

Determining cofactors is easier with more zeroes in the matrix, so reducing a matrix to RREF via EROs and switching columns is simpler.

  • If there is row or column of zeros,
  • If with exactly one pair of swapped rows,
  • If by adding multiples of rows or columns to each other,
  • If with exactly one row or column a scalar multiple of ,

Properties;

Triangular matrices

A triangular matrix is in REF or REF transposed.

If is an upper triangular matrix, it is in REF and all entries below the main diagonal are zero, and is equal to the sum of all entries along the main diagonal.

Polynomial interpolation

Given points distinct in its domain, a polynomial with a degree of can always be found by substituting in the and values for each point to form the following Vandermonde matrix used in the matrix-vector product:

The determinant of the Vandermonde matrix can be determined by taking the product of the different between every entry. If any entry is equal to another entry, the determinant must be zero.

Eigens

If for some while :

  • is an eigenvalue of , and
  • is an eigenvector of corresponding to .

Only non-zero eigenvectors should be found unless otherwise specified since any eigenvalue would work for that.

To solve for eigenvectors, the system below should be solved.

The determinant of the system can be used to check if there will be any eigenvectors.

  • If , there is exactly one solution which is the trivial solution, so is an eigenvalue.
  • If , there are multiple solutions, so is not an eigenvalue.

The characteristic polynomial of an eigenvalue is equal to its determinant, and can be used to solve for eigenvalues when is unknown.

Any complex values result in complex eigenvalues, and any complex eigenvalues guarantees the existence of another eigenvalue equal to the conjugate of the eigenvalue with corresponding vectors equal to the conjugate of the original corresponding vector.

If the system is any triangular matrix, the eigenvalues are equal to the main diagonal.

Warn

When solving eigenvectors in the form , must be specified.

An eigenspace is the vector space of eigenvectors for a given eigenvalue:

The dimension of the eigenspace is guaranteed to be less than or equal to the number of times the eigenvalue appears in the characteristic polynomial.

By default, a square matrix of size has degree .

The algebraic multiplicity is the number of times appears as a root of .

The geometric multiplicity is the dimension of eigenspace .

It is guaranteed that, for all eigenvalues:

Diagonal matrices

A diagonal matrix has every entry equal to zero except for the main diagonal (which may be equal to zero).

For two diagonal matrixes and :

An matrix is diagonalisable if and only if there is an invertible matrix and diagonal matrix with the same size such that:

The matrix diagonalises to , and neither of the two are unique.

If is diagonalisable, is the matrix of all eigenvalues, and is the matrix of all eigenvectors, such that the column of the eigenvalue in corresponds to the column of the eigenvector in .

If is a basis for the th eigenspace for , , which is linearly independent.

The matrix is diagonalisable if and only if there is a basis for consisting of eigenvectors of . Therefore:

  • A matrix is diagonalisable if and only if for every eigenvalue of
  • If an matrix has exactly distinct eigenvalues, is diagonalisable

It's easy to calculate the powers of a diagonalisable matrix:

Traces

The trace of a matrix is the sum of the main diagonal.

Alternatively, where is the number of times an eigenvalue appears:

This results in the trace equal to the product of each eigenvector as they appear in the main diagonal.

Orthogonality

Definition

  • An orthogonal basis is an orthogonal set that is a basis.
  • An orthonormal set contains only orthogonal vectors that have a norm of 1.

A subspace is orthogonal if and only if each vector in their bases are all orthogonal to each vector in the other subspace's basis.

An orthonormal basis makes it easy to solve for linear combinations, as the coefficient to that vector is equal to the dot product between the solution vector and the basis vector:

They can be derived via the Gram-Schmidt process:

where is the normalised vector and is the original, each vector is orthonormalised to one by taking its projection to every other orthonormalised vector before it:

A set is orthogonal if and only if each vector is orthogonal to every other.

An orthogonal set with only non-zero vectors is linearly independent.

An orthonormal matrix has its inverse equal to its transpose:

which has the unique property that the rows of and columns of are each an orthonormal basis for .

To orthogonally diagonalise a matrix, the orthogonal basis should be diagonalised.

  1. Calculate eigenspaces
  2. Calculate bases for each eigenspace
  3. Do not use Gram-Schmidt in eigenspaces because that changes the direction, making it no longer an eigenspace
  4. If all eigenspaces are orthogonal to each other, diagonalise

Symmetric matrices

Because magic:

This allows the conversion of the dot product to a matrix multiplication:

If a matrix is symmetric and has at least two distinct eigenvalues, their eigenspaces are orthogonal to each other, so long: