Comprehensive Study Guide: Algebra and Numerical Methods for Sustainable Economy
Fundamentals of Numerical Computing and Representation In the field of numerical calculus, a numerical method is defined as an algorithm used to obtain an approximate solution to a mathematical problem starting from the exact one through a finite number of operations. The core objective is to reach a solution close to the analytical one using a limited succession of logical and arithmetic steps. Within a computer, it is fundamentally impossible to implement exact arithmetic operations for all real numbers due to limits in numerical representation. Numerical representation typically falls into two categories: fixed-point and floating-point. Fixed-point representation maintains the decimal point in a static position, limiting the range and precision of fractional numbers. In contrast, floating-point representation expresses numbers using a variable base and exponent (mantissa and exponent system), which enables the representation of extremely large or extremely small values. Numerical limits in these systems lead to two specific conditions: Overflow, which occurs when a number's value exceeds the maximum capacity representable by the computer, and Underflow, which happens when a value is too small to be represented within the format's limited precision. Machine precision (eps) is defined as the difference between the value represented by a computer and the true real value of a number. # Mathematical Bases, Significant Figures, and Error Analysis Accuracy is determined by the number of significant figures in a value. For example, the number 0,00458 contains three significant figures (4,5,8), because leading zeros are not considered significant. Conversely, the value 5,6700×103 has five significant figures because zeros to the right of a decimal or between other digits are significant. Binary conversion is essential; the decimal number 13 is represented as (1101)2 in base 2, and 25 is represented as (11001)2. To convert back, the binary number (11011)2 equals 27 in base 10 (1×24+1×23+0×22+1×21+1×20=16+8+0+2+1=27), and (10110)2 equals 22. Errors in numerical computation primarily arise from rounding and truncation. Rounding error occurs when a number is approximated to the nearest representable value, accounting for the digits being removed. Truncation error occurs when a calculation is approximated by simply cutting off digits without considering their value, effectively lowering the precision. Truncation is generally less precise than rounding because it discards more information. Error propagation is heavily influenced by the format; moving from double precision to single precision reduces the number of usable digits, thereby amplifying truncation errors. Conversely, moving from single to double precision or increasing significant figures attenuates these errors. # Matrix Theory and Characterization A matrix is a rectangular array of numbers. The order of a matrix is defined by its number of rows and columns. Specific matrix types include: 1. Null Matrix: A matrix where all elements are zero. 2. Identity Matrix (I): A square matrix with ones on the diagonal and zeros elsewhere. 3. Symmetric Matrix: A matrix equal to its transpose (A=AT). 4. Defined Positive Matrix: A symmetric matrix (A=AT) satisfying (xT)Ax>0 for every non-zero vector x. 5. Tridiagonal Matrix: A square matrix where only the main diagonal, the sub-diagonal, and the super-diagonal contain non-zero elements. 6. Triangular Matrices: A Lower Triangular matrix has all elements above the main diagonal equal to zero. An Upper Triangular matrix has all elements below the main diagonal equal to zero. 7. Singular Matrix: A square matrix with a determinant equal to zero (det(A)=0), often implying linearly dependent rows or columns. 8. Transpose Matrix (AT): Obtained by swapping the rows and columns of the original matrix. For example, if A=350212809, its transpose is AT=328510029. The Trace (tr(A)) is the sum of the elements on the main diagonal. For instance, for A=241015013678012−3, tr(A)=2+5+7+(−3)=11. Note that tr(AB)=tr(BA) and tr(A+B)=tr(A)+tr(B). Matrix Rank is the maximum order of non-zero minors within the matrix. The rank of an identity matrix of order n is always n. # Matrix Operations and Determinants Fundamental matrix operations include addition, multiplication by a scalar, and matrix-matrix multiplication. Multiplication by the identity matrix (A×I) returns A. Multiplication by the null matrix (A×O) results in the null matrix. Adding a matrix to the identity matrix (A+I) increases only the diagonal elements of A by 1. Adding a matrix to its opposite (A+(−A)) results in the null matrix. The Determinant is a scalar value that can only be calculated for square matrices. For a 1×1 matrix with element a11=−5, the determinant is −5. For a 2×2 matrix A=(25−411−7), the determinant is (25×−7)−(11×−4)=−175+44=−131. For triangular matrices of any order (e.g., 5×5), the determinant is the product of the elements on the main diagonal. For example, a diagonal matrix A=diag(3,1,1,−5) has a determinant of −15. Vector norms are measures of magnitude. The Euclidean Norm (∣∣v∣∣2) is calculated as ∑∣xi∣2. For the vector [2,−1,4], the norm is 22+(−1)2+42=4+1+16=21≈4.58. Two vectors are orthogonal if their scalar product is zero. # Solving Linear Systems A linear system Ax=b is classified as Determined if it has a unique solution, Indetermined if it has infinite solutions, and Incompatible if it has no solution. If the determinant of the coefficient matrix is zero, the system is singular. Condition of the problem refers to how sensitive the solution is to data perturbations. A problem is Well-conditioned if small variations in input yield small variations in the solution, and Mal-conditioned if small input variations yield large solution changes. Numerical methods for solving systems are divided into Direct and Iterative methods. Direct Methods provide the exact solution (in the absence of rounding errors) in a finite number of steps. Examples include Cramer's Rule, Gaussian Elimination, LU Factorization, and Cholesky Factorization. Gaussian Elimination transforms the matrix into an upper triangular form, followed by backward substitution. If a pivot is zero, the standard method fails. If all pivots are non-zero, a unique solution exists. For large systems (e.g., n=100), Gaussian Elimination is much more efficient than Cramer's Rule. Pivoting strategies help manage errors: Partial Pivoting involves swapping rows to select the maximum absolute value in the current column as the pivot, while Total Pivoting selects the maximum absolute value from the entire remaining submatrix (swapping both rows and columns). LU Factorization decomposes matrix A into a lower triangular matrix L and an upper triangular matrix U such that A=LU. Once found, the system is solved by solving Ly=b (forward substitution) and then Ux=y (backward substitution). Cholesky Factorization is a specialized LU version (A=LLT) applicable only to symmetric and positive definite matrices; it is the most efficient direct method for such systems. Iterative Methods, such as Jacobi and Gauss-Seidel, start with an initial guess and refine it. These are preferred for very large or sparse systems where direct methods are computationally expensive. # Finding Roots of Non-linear Equations To solve f(x)=0 for non-linear functions, several methods exist: 1. Bisection Method: Requires the function to be continuous and have opposite signs at the endpoints of an interval [a,b]. It uses the formula c=0.5(a+b) to halve the interval each iteration. It always converges if the initial condition is met. 2. False Position (Regula Falsi): Operates similarly to bisection but uses a linear interpolation between points. It always converges for continuous functions with a sign change. 3. Newton-Raphson Method: Requires an initial point and the function's derivative. The formula is xn+1=xn−f′(xn)f(xn). It converges very fast but may fail if the derivative is zero or if there are inflection points near the root. 4. Secant Method: Similar to Newton but approximates the derivative using two initial points. Iterations for these methods are typically stopped when the relative error between steps (∣xn+1−xn∣/∣xn+1∣) falls below a predefined tolerance. # Eigenvalues and the Power Method Eigenvalues (λ) are found by solving the characteristic equation det(A−λI)=0. For a diagonal matrix, the eigenvalues are simply the elements on the diagonal. For a matrix A=(1221), the eigenvalues are 3 and −1. Gerschgorin's Theorem provides a way to localize eigenvalues in the complex plane using circles (disks). The center of each circle is the diagonal element aii, and the radius is the sum of the absolute values of the off-diagonal elements in that row. The Power Method (Metodo delle potenze) is an iterative technique used to find the dominant eigenvalue (the one with the largest absolute value) and its corresponding eigenvector. Starting from an initial vector x0, it repeatedly multiplies by A and normalizes the result. # Numerical Differential Equations To solve Ordinary Differential Equations (ODEs) like y′=f(t,y), methods are categorized as One-step or Multi-step. One-step methods, like the Euler methods, use only the current value to find the next. Euler Forward (Explicit) calculates the next step directly as yn+1=yn+hf(tn,yn). Euler Backward (Implicit) is more stable for "stiff" problems but requires solving an equation since it uses the future value: yn+1=yn+hf(tn+1,yn+1). Multi-step methods use several previous values to calculate the next point, often providing higher accuracy than simple one-step methods. # Questions & Discussion The question set includes several open-ended discussion points and calculation exercises: 1. Solving linear systems using Gaussian Elimination and LU Factorization, including specific matrices like A=1323−2−113−3 with b=[3;−3;2]. 2. Discussion on error propagation: defining it as the magnification of initial or rounding errors during calculation, occurring frequently in long algorithmic chains, and mitigated by using higher precision or stable algorithms. 3. Step-by-step application of the Newton-Raphson method for polynomial functions such as f=[1,−1,−2] (representing x2−x−2=0). 4. Comparison of Euler Explicit vs. Implicit: forward is easier to compute but less stable; backward is stable for stiff equations but computationally harder as it requires solving systems. 5. Power method iterations: given A=(4114) and x0=[1;1], the first iteration yields an eigenvalue estimate of 5.00 and an eigenvector of [0.71,0.71]. 6. Stopping criteria: Iterations in root-finding or linear system solvers are stopped when the precision (relative error) meets a threshold or a maximum number of steps is reached.