* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Computational Linear Algebra
Capelli's identity wikipedia , lookup
Matrix completion wikipedia , lookup
Linear least squares (mathematics) wikipedia , lookup
System of linear equations wikipedia , lookup
Rotation matrix wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Principal component analysis wikipedia , lookup
Jordan normal form wikipedia , lookup
Four-vector wikipedia , lookup
Determinant wikipedia , lookup
Matrix (mathematics) wikipedia , lookup
Singular-value decomposition wikipedia , lookup
Non-negative matrix factorization wikipedia , lookup
Perron–Frobenius theorem wikipedia , lookup
Ordinary least squares wikipedia , lookup
Orthogonal matrix wikipedia , lookup
Matrix calculus wikipedia , lookup
Cayley–Hamilton theorem wikipedia , lookup
Math 234 Computational Linear Algebra Linear Algebra on the Calculator To enter a matrix into a TI-83 calculator, access the MATRIX menu by pressing the buttons 2nd x-1. First create a matrix by using the right arrow to go to the EDIT menu. Select the name of the matrix you want to edit and then press ENTER. Note that you first set the matrix dimensions. Press QUIT (2nd MODE) to go back to the standard calculator screen. If we want to enter a matrix name on the screen, go back to the MATRIX screen (2nd x-1) and select the name you want. Note this screen tells you which matrices have values and their sizes. Press ENTER and the name will appear on the screen. For example, typing [A]^2 will compute the square. We can add, subtract, multiply, and invert (A-1) matrices easily. Other matrix operations such as the transpose are available under the MATH screen of the MATRIX menu. The calculator will give you an error message if the quantity is undefined. For example, the matrix A we entered is not invertible. If we tried to compute the inverse of A by using the x-1 button we get: Linear Algebra on the Computer The software Freemat is a free version of Matlab, a powerful linear algebra solver. You can download Freemat at: freemat.sourceforge.net Freemat processes commands through the command line. For example, if you type --> x = 2 + 3 and press ENTER, Freemat will respond: x=5 To type in a matrix variable, we surround the values with square brackets. The semicolon ";" appears at the end of each row, like a line break. For example, if you type --> A = [1 2 3; 4 5 6] --> B = [1 2; 3 4; 5 6] You will now have a 2x3 matrix A and a 3x2 matrix B. Freemat can now do matrix arithmetic with these variables. For example, to multiply the matrices we can type: --> A*B Freemat responds with the answer ans = 22 28 49 64 If we wanted to store this answer in another matrix C, we would instead type: --> C=A*B Freemat will give an error message when the quantity is undefined. For example, if we try to add the matrices A and B, we would get: --> A+B Error: size mismatch in arguments to binary operator To access an individual element of a matrix, we look it up as (row,column). For example, we could change the entry in the 2nd row, 3rd column of A from 6 to 42 by --> A(2,3)=42 A= 1 2 3 4 5 42 Some useful commands Matrix dimensions: size(A) Scalar Multiplication: 4*A Matrix Multiplication: A*B Matrix Powers: A^4 Transpose: A' NxN Identity Matrix: eye(N) Pointwise Multiplication: A.*B Pointwise Exponent: A.^3 Determinant: det(A) Rank: rank(A) Inverse: inv(A) Trace: trace(A) Row Reduction: rref(A) Eigenvalues: eig(A) Eigenvectors: [v,d]=eig(A) Singular Value Decomposition: [U,S,V]=svd(A)