Applied Linear Algebra in Geoscience Using MATLAB
Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in MATLAB User-Defined Functions and Function Files Polynomials, Curve Fitting, and Interpolation Applications in Numerical Analysis Three-Dimensional Plots Symbolic Math Matrices Linear equations Determinants Eigenvalues and eigenvectors Orthogonal vectors and matrices Vector and matrix norms Gaussian elimination and the LU dec. Linear system applications Gram-Schmidt decomposition The singular value decomposition Least-squares problems Linear Independence Basis of a Subspace The Rank of a Matrix Implementing the QR factorization The algebraic eigenvalue problem
Orthogonal Vectors and Matrices In three-dimensional space, points are defined as ordered triples of real numbers and the distance between points (e.g. P 1 and P 2 ) is defined by Directed line segments of P 1 P 2 are introduced as three-dimensional column vectors If P is a point, we let P =OP and call P the position vector of P, where O is the origin.
Geometrical interpretations There are geometrical interpretations of equality, addition, subtraction, and scalar multiplication of vector Equality of vectors: Suppose A, B, C, D are distinct points such that no three are collinear. Then if and only if
The Inner Product Inner product defines vector length, orthonormal bases, the L 2 matrix norm, projections, and Householder reflections., y = Given these two vectors in R n, we define the inner product of x and y, written <x, y> to be the real number or In many books, the notation x y to refers to the inner product, and it is called the dot product. The inner product has the following properties:
Geometrical interpretations The notation u 2 will be used to specify the length of vector u Note that the length of each side is the length of the vector forming that side. The law of cosines tells us that This formula is usually used to determine the angle between two vectors, not to compute the inner product.
Geometrical interpretations Determine the angle between Another application of the inner product is to determine whether two vectors are perpendicular or parallel. Vectors u and v are perpendicular, when the angle θ between them is π/2. Vectors u and v are parallel when the angle between them is either 0 radians (pointing in the same direction) or π radians (pointing in opposite directions) Determine if the following vectors are parallel, perpendicular, or neither.
Orthogonal Matrices Orthogonal matrices are the most beautiful of all matrices Many tools in numerical linear algebra involve orthogonal matrices, such as the QR decomposition and the singular value decomposition (SVD) An n n matrix P is orthogonal if P T =P -1 is orthogonal, since Now, take a look at the columns of P so each column has length 1 (unit vector) Take the inner product of columns 1 and 2 A set of orthogonal vectors, each with unit length, are said to be orthonormal.
Geometrical interpretations The P (n n matrix) is an orthogonal matrix if and only if the columns of P are orthogonal and have unit length. Orthogonal matrices have other interesting properties. Among them is the fact the their determinant is always ±1. If A is a real symmetric matrix, then any two eigenvectors (corresponding to distinct eigenvalues) are orthogonal. The three eigenvectors are mutually orthogonal, and you also should note that the eigenvectors are linearly independent As a result, the matrix X is invertible. A is diagonalizable.
Geometrical interpretations Let s go one step further and build a matrix, P, whose columns are those of X converted to a unit vector Do this by dividing each column vector by its length. P is an orthogonal matrix Compute the P T AP and you will again get D. Thus, A is diagonalizable using an orthogonal matrix.
The L 2 Inner Product If functions f(t) and g(t) are continuous on the interval a t b, the L 2 inner product is Example
Cauchy-Schwarz The Cauchy-Schwarz inequality is one of the most widely used inequalities in mathematics. This occurs when u and v are parallel, or when v = cu for some scalar multiple c. For any n-dimensional vectors u and v, and equality occurs if and only if v = cu. Recall in high school geometry you were told that the sum of the lengths of two sides of a triangle is greater than the third side. This is an instance of the triangle inequality that follows by using the Cauchy-Schwarz inequality: