Software Manual Table of Contents
This is the Software Manual created for Math 5610: Computational Linear Algebra and Solution of Systems of Equations. Contained within are a list of documented subroutines created for solving systems of equations computationally.
Subroutines
The subroutines contained in this manual will be split according to their general purpose in solving computational linear algebra problems
Basic Linear Algebra
- abs_err_n : Calculates the absolute error for a value and its approximation.
- abs_err_vecl1 : Calculates the absolute error between two vectors using the
-norm.
- abs_err_vecl2 : Calculates the absolute error between two vectors using the
-norm.
- abs_err_vecl_inf : Calculates the absolute error between two vectors using the
-norm.
- dmaceps : Finds the machine epsilon for double precision.
- l1_vec_norm : Calculates the
-norm of a vector.
- l2_vec_norm : Calculates the
-norm of a vector.
- l_inf_vec_norm : Calculates the
-norm of a vector.
- mat_1norm : Calculates the
-norm of a square matrix.
- mat_add : Computes the sum of two matrices of equal size.
- mat_dd : Generates a random, square, diagonally dominant matrix with n rows and columns.
- mat_infnorm : Calculates the
-norm of a square matrix.
- mat_prod : Calculates the product of two matrices with equal inner dimension.
- mat_row_ech : Transforms an arbitrary matrix of size (m, n) into row echelon form.
- out_prod_vec : Calculates the outer product of two vectors.
- rand_mat : Generates a random matrix of size (r, c).
- rel_err_n : Calculates the relative error for a value and its approximation.
- smaceps : Finds the machine epsilon for single precision.
- s_mult_mat : Multiplies a matrix by a scalar value.
- s_mult_vec : Multiplies a vector by a scalar value.
- spd_mat_gen : Generates a symmetric, positive definite matrix.
- sym_dd_mat_gen : Generates a symmetric, diagonally dominant matrix.
- sym_mat_gen : Generates a symmetric matrix.
- vec_add : Adds two vectors together.
- vec_cross_prod3 : Calculates the cross product of two vectors of length 3.
- vec_dot_prod : Calculates the dot product of two vectors of the same size.
Direct Methods
- backsub : Computes the solution of a square, linear system of equations where the coefficient matrix is an upper-triangular matrix using the backward substitution algorithm.
- cholesky_factor : Uses Cholesky decomposition on a square, symmetric, positive definite matrix to decompose the matrix into its Cholesky factor.
- direct_ge_bs : Solves a square linear system of equations using Gaussian elimination and backward substitution.
- direct_ge_bsin : Solves a square linear system of equations using Gaussian elimination and backward substitution in-line. More computationally efficient than
direct_ge_bs
. - forwardsub : Computes the solution of a square, linear system of equations where the coefficient matrix is a lower-triangular matrix using the forward substitution algorithm.
- lss_diag : Computes the solution of a square, linear system of equations where the coefficient matrix is a diagonal matrix.
- lu_factor : Uses LU decomposition on a square coefficient matrix to decompose the matrix into its L and U components.
- lu_solve : Solves a square linear system of equations using an LU-factored coefficient matrix, forward substitution, and backward substitution.
Eigenvalue Solvers
- eigen_search : Conducts a search for eigenvalues on the interval between the lowest and highest eigenvalues in a system.
- inverse_iteration : Uses the inverse iteration method with shifting to find any eigenvalue and its corresponding eigenvector. Uses LU decomposition to solve the shifted system in each iteration.
- jac_inverse_iteration : Uses the inverse iteration method with shifting to find any eigenvalue and its corresponding eigenvector. Uses the Jacobi Iteration to solve the shifted system in each iteration.
- K2_cond : Estimates the l2 condition number of a symmetric positive definite matrix.
- power_method : Uses the power method to find the largest eigenvalue and corresponding eigenvector.
- rayleigh_cond : Uses the Rayleigh Quotient iterative method to find the condition number of a matrix.
- rayleigh_quotient : Uses the Rayleigh Quotient iterative method to find the eigenvalue matching most closely to some initial eigenvector.
Iterative Methods
- cg_method : Iteratively approximates the solution to a system of equations using the Conjugate Gradient method.
- jacobi_solve : Iteratively approximates the solution to a system of equations using the Jacobi Iteration method.
- gaussseidel_solve : Iteratively approximates the solution to a system of equations using the Gauss-Seidel method.
- steepest_descent : Iteratively approximates the solution to a system of equations using the steepest descent method.
Least Squares Solvers
- ls_solvejacobi : Solves the least squares problem using the setup to the normal equations and then the Jacobi Iteration routine.
- ls_solveqr : Solves the least squares problem using the Householder transformation QR factorization.
- ls_solveqrmod : Solves the least squares problem using the modified Gram-Schmidt orthogonalization QR factorization.
- solve_normal_equations : Solves the least squares problem using the normal equations.
- qr_factor_gs : Uses classical Gram-Schmidt orthogonalization on a coefficient matrix to decompose the matrix into its Q and R components.
- qr_factor_hh : Uses Householder transformations on a coefficient matrix to decompose the matrix into its Q and R components.
- qr_factor_modgs : Uses modified Gram-Schmidt orthogonalization on a coefficient matrix to decompose the matrix into its Q and R components.
- qr_sq_solve : Finds the solution to a square, linear system of equations using QR factorization.