humanoid robotics compact course on linear algebra · § for matrices the sarrus rule holds:...
TRANSCRIPT
![Page 1: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/1.jpg)
Humanoid Robotics
Compact Course on Linear Algebra Padmaja Kulkarni Maren Bennewitz
![Page 2: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/2.jpg)
Vectors § Arrays of numbers § Vectors represent a point in a n dimensional
space
![Page 3: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/3.jpg)
Vectors: Scalar Product § Scalar-vector product § Changes the length of the vector, but not
its direction
![Page 4: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/4.jpg)
Vectors: Sum § Sum of vectors (is commutative)
§ Can be visualized as “chaining” the vectors
![Page 5: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/5.jpg)
Vectors: Dot Product § Inner product of vectors (yields a scalar)
§ If , the two vectors are orthogonal
![Page 6: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/6.jpg)
Vectors: Dot Product § Inner product of vectors (yields a scalar)
§ If one of the vectors, e.g., has , the product returns the length of the projection of along the direction of
§ If , the two vectors are orthogonal
![Page 7: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/7.jpg)
Vectors: Linear (In)Dependence
§ A vector is linearly dependent from if
![Page 8: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/8.jpg)
Vectors: Linear (In)Dependence
§ A vector is linearly dependent from if
![Page 9: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/9.jpg)
Vectors: Linear (In)Dependence
§ A vector is linearly dependent from if
§ If there exist no such that then is independent from
![Page 10: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/10.jpg)
Matrices § A matrix is written as a table of values
§ 1st index refers to the row § 2nd index refers to the column
columns rows
![Page 11: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/11.jpg)
Matrices as Collections of Vectors § Column vectors
![Page 12: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/12.jpg)
Matrices as Collections of Vectors § Row vectors
![Page 13: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/13.jpg)
Important Matrix Operations § Multiplication by a scalar § Sum (commutative, associative) § Multiplication by a vector § Product (not commutative) § Inversion (square, full rank) § Transposition
![Page 14: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/14.jpg)
Scalar Multiplication & Sum § In the scalar multiplication, every
element of the vector or matrix is multiplied with the scalar
§ The sum of two matrices is a matrix consisting of the pair-wise sums of the individual entries
![Page 15: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/15.jpg)
Matrix Vector Product § The ith component of is the dot
product . § The vector is linearly dependent from
with coefficients
column vectors row vectors
![Page 16: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/16.jpg)
Matrix Matrix Product § Can be defined through
§ the dot product of row and column vectors § the linear combination of the columns of
scaled by the coefficients of the columns of
![Page 17: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/17.jpg)
Matrix Matrix Product § If we consider the second interpretation,
we see that the columns of are the “global transformations” of the columns of through
§ All the interpretations made for the matrix vector product hold
![Page 18: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/18.jpg)
Inverse
§ If is a square matrix of full rank, then there is a unique matrix such that holds
§ The ith row of and the jth column of are § orthogonal (if i ≠ j) § or their dot product is 1 (if i = j)
![Page 19: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/19.jpg)
Matrix Inversion
§ The ith column of can be found by solving the following linear system:
This is the ith column of the identity matrix
![Page 20: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/20.jpg)
Linear Systems (1)
§ A set of linear equations § Solvable by Gaussian elimination
(as taught in school) § Many efficient solvers exit, e.g., conjugate
gradients, sparse Cholesky decomposition
![Page 21: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/21.jpg)
Linear Systems (2)
Notes: § Many efficient solvers exit, e.g., conjugate
gradients, sparse Cholesky decomposition § One can obtain a reduced system by
considering the matrix and suppressing all the rows which are linearly dependent
§ Let be the reduced system with : n'xm and : n'x1 and
§ The system might be either overdetermined (n’>m) or underconstrained (n’<m)
![Page 22: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/22.jpg)
Overdetermined Systems § More independent equations than variables § An overdetermined system does not admit
an exact solution § “Least-squares" problem
![Page 23: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/23.jpg)
Determinant (det) § Only defined for square matrices § The inverse of exists if and only if § For matrices:
Let and , then § For matrices the Sarrus rule holds:
![Page 24: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/24.jpg)
Determinant § For general matrices?
Let be the submatrix obtained from by deleting the i-th row and the j-th column
Rewrite determinant for matrices:
![Page 25: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/25.jpg)
Determinant § For general matrices?
Let be the (i,j)-cofactor, then This is called the cofactor expansion across the first row
![Page 26: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/26.jpg)
Determinant § Gauss elimination to bring the matrix into
triangular form
§ For triangular matrices, the determinant is the product of diagonal elements
§ Can be used to compute Eigenvalues: Solve the characteristic polynomial
§ Because
![Page 27: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/27.jpg)
Determinant: Applications § Find the inverse using Cramer’s rule
with being the adjugate of
with Cij being the cofactors of A, i.e.,
![Page 28: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/28.jpg)
Orthonormal Matrix § A matrix is orthonormal iff its column (row)
vectors represent an orthonormal basis
§ Some properties: § The transpose is the inverse § Determinant has unity norm (± 1)
![Page 29: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/29.jpg)
Rotation Matrix (Orthonormal)
§ 2D Rotations:
§ 3D Rotations along the main axes
§ The inverse is the transpose (efficient)
§ IMPORTANT: Rotations are not commutative!
![Page 30: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/30.jpg)
Jacobian Matrix
§ It is a non-square matrix in general
§ Given a vector-valued function
§ Then, the Jacobian matrix is defined as
![Page 31: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/31.jpg)
§ Orientation of the tangent plane to the vector-valued function at a given point
§ Generalizes the gradient of a scalar valued function
Jacobian Matrix
![Page 32: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/32.jpg)
Quadratic Forms § Many functions can be locally approximated
with a quadratic form
§ Often, one is interested in finding the minimum (or maximum) of a quadratic form, i.e.,
![Page 33: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/33.jpg)
Quadratic Forms § Question: How to efficiently compute a
solution to this minimization problem
§ At the minimum, we have § By using the definition of matrix product,
we can compute
![Page 34: Humanoid Robotics Compact Course on Linear Algebra · § For matrices the Sarrus rule holds: Determinant § For general matrices? Let be the submatrix obtained from by deleting the](https://reader033.vdocuments.us/reader033/viewer/2022041804/5e53658660f9486800477b0c/html5/thumbnails/34.jpg)
Quadratic Forms § The minimum of is
where its derivative is 0
§ Thus, we can solve the system
§ If the matrix is symmetric, the system becomes
§ Solving that, leads to the minimum