Linear algebra: matrices

Slides:



Advertisements
Presentaciones similares
Transformaciones que conservan ángulos
Advertisements

Articles, nouns and contractions oh my!. The POWER of the article THE 1. There are four ways to express THE in Spanish 2. The four ways are: El La Los.
1 DEFINITION OF A CIRCLE and example CIRCLES PROBLEM 1a PROBLEM 2a Standard 4, 9, 17 PROBLEM 1b PROBLEM 2b PROBLEM 3 END SHOW PRESENTATION CREATED BY SIMON.
Los verbos regulares – ar What is an infinitive? An infinitive in both Spanish and English is the base form of the verb. In English, the infinitive.
Calentamiento Write about the following images using the verb conocer from yesterday: ej. Yo conozco a Sra. Bender 1)2) 3)4)
Linear algebra: matrices Horacio Rodríguez. Introduction Some of the slides are reused from my course on graph- based methods in NLP (U. Alicante, 2008)
1 Solving Systems of Equations and Inequalities that Involve Conics PROBLEM 4 PROBLEM 1 Standard 4, 9, 16, 17 PROBLEM 3 PROBLEM 2 PROBLEM 5 END SHOW PROBLEM.
La Hora... Telling Time in Spanish. ¿Que hora es? The verb ser is used to express the time of day. Use es when referring to "one o'clock" and use son.
4.1 Continuidad en un punto 4.2 Tipos de discontinuidades 4.3 Continuidad en intervalos.
1 Can Quadratic Techniques Solve Polynomial Equations? PROBLEM 1 Standards PROBLEM 3 PROBLEM 2 PRESENTATION CREATED BY SIMON PEREZ. All rights reserved.
Objective: I can recognize and accurately use gender agreement. Do Now: Match the following Spanish and English words: 1. Pelirroja a. Good-looking 2.
Notes #18 Numbers 31 and higher Standard 1.2
HYPERBOLAS Standard 4, 9, 16, 17 DEFINITION OF A HYPERBOLA
DEFINITION OF A ELLIPSE STANDARD FORMULAS FOR ELLIPSES
What has to be done today? It can be done in any order. Make a new ALC form Do the ALC Get two popsicle sticks Get 16 feet of yarn. That is 4 arms width.
1 SOLVING RATIONAL EQUATIONS SIMPLIFYING RATIONAL EXPRESSIONS Standards 4, 7, 15, 25 ADDING RATIONAL EXPRESSIONS PROBLEM 1 RATIONAL EXPRESSIONS PROBLEM.
Digital Photography: Selfie Slides
Definite & indefinite articles
Digital Photography: Selfie Slides By: Essence L. Thomas.
Tecnología y Estructura de Costos. Technologies u A technology is a process by which inputs are converted to an output. u E.g. labor, a computer, a projector,
Digital Photography: Selfie Slides Your Name Date Class Period.
 The Spanish Present Tense is generally used, as in English, to describe actions that are happening right now. I eat – Como However, it is also used.
Nuestra escuela. Un proyecto de mandatos y localizaciones.
It´s a Semantic content of a clause That means that any proposition (deep structure/meaning) can be expressed in different forms. Focus on Semantics.
LecturePLUS Timberlake1 The Atom Atomic Number and Mass Number Isotopes.
¿Cuánto tiempo hace que…? You can ask when something happened in Spanish by using: ¿Cuándo + [preterit verb]…? ¿Cuándo llegaste a la clínica? When did.
THE VERB ESTAR Español 1 – Unidad 2 Lección 2. THE VERB ESTAR The verb estar means TO BE and is used to indicate LOCATION as well as to say how people.
Linear Wire Antennas Infinitesimal Dipole From: Balanis, C. A. “Antenna Theory, Analysis and Design” Third Edition. A John Wiley & Sons, Inc.,Publication.
EQUILIBRIUM OF A PARTICLE IN 2-D Today’s Objectives: Students will be able to : a) Draw a free body diagram (FBD), and, b) Apply equations of equilibrium.
MATRICES Por Jorge Sánchez.
Los sustantivos Los artículos definidos y indefinidos
Los Adjetivos Posesivos
Notes #20 Notes #20 There are three basic ways to ask questions in Spanish. Can you guess what they are by looking at the photos and photo captions on.
Examen 4A El mapa gráfico.
Quasimodo: Get ready for your quiz!.
TIPOS DE MATRICES Matriz fila. Dimensión 1  n. A = ( )
SPANISH Middle School Grammar Lesson Subject pronouns Verbs.
To be, or not to be? Let’s start out with one of the most important verbs in Spanish: ser, which means “to be.”
Double Object Pronouns
SER and SUBJECT PRONOUNS
POSSESSIVE ADJECTIVES
First Grade Dual High Frequency Words
-ER & -IR Verbs As we saw in the previous presentation, there are three conjugations of verbs in Spanish: –AR, –ER, and –IR. -ER and –IR verbs are often.
GRAPHIC MATERIALS 1. GRAPHIC MATERIALS. GRAPHIC MATERIALS 1. GRAPHIC MATERIALS.
Interactive notebook page 32
Un buen comienzo para un buen futuro Tópico: “No hay uno sin dos” Sucesiones Ing. Gabriel Jaime Ramírez Henao.
Youden Analysis. Introduction to W. J. Youden Components of the Youden Graph Calculations Getting the “Circle” What to do with the results.
WHAT IS THE BLOCKCHAIN? The Blockchain is a distributed ledger, or a decentralized data base in which digital transactions are recorded. This data base,
What is the only difference between –er and –ir verbs when conjugated?
Los números.
-er & -ir Verbs As we saw in the previous presentation, there are three conjugations of verbs in Spanish: -ar, -er, and -ir. -er and -ir verbs are often.
Quasimodo: Tienes que hacer parte D de la tarea..
Magnitudes vectoriales
El subjuntivo en cláusulas adverbiales:
El subjuntivo en cláusulas adverbiales:
INTRODUCCIÓN 1. Álgebra lineal y vectores aleatorios 2. Distribución normal multivariante ANÁLISIS DE LA MATRIZ DE COVARIANZAS 3. Componentes principales.
In Lección 2, you learned how to express preferences with gustar
UNIVERSIDAD TECNICA DE MACHALA UNIDAD ACADEMICA DE CIENCIAS EMPRESARIALES CARRERA DE ECONOMIA ESTUDENTS: FIRST CONDITIONAL SENTENCES TEACHER: - Calvache.
Magnitudes vectoriales
The Windows File System and Windows Explorer To move around the file system and examine your files or get to one you want (say, to modify, delete or copy.
ZERO CONDITIONAL. What is zero conditional? Zero conditional is a structure used to talk about general truths, that is, things that always happen under.
UNIT 1: The structure of matter: FQ3eso_U1_3: Electron configurations
Los adjetivos demostrativos Notes #16 What is a demonstrative adjective in English? Demonstrative adjectives in English are simply the words: THISTHESE.
Gustar, Interesar, Aburrir
-ER & -IR Verbs As we saw in the previous presentation, there are three conjugations of verbs in Spanish: –AR, –ER, and –IR. -ER and –IR verbs are often.
Astronomy has really big numbers. Distance between Earth and Sun meters kilometers This is the closest star.
The causative is a common structure in English. It is used when one thing or person causes another thing or person to do something.
In Lección 2, you learned how to express preferences with gustar
Las Preguntas (the questions) Tengo una pregunta… Sí, Juan habla mucho con el profesor en clase. No, Juan no habla mucho en clase. s vo s vo Forming.
Transcripción de la presentación:

Linear algebra: matrices Horacio Rodríguez El problema de la desambiguació morfosintàctica: un enfocament d’aprenentatge automàtic basat en arbres de decisió Aplicació de tècniques d’aprenentatge automàtic al problema de la desambiguació morfosintàctica

Introduction Some of the slides are reused from my course on graph-based methods in NLP (U. Alicante, 2008) http://www.lsi.upc.es/~horacio/varios/graph.tar.gz so, some of the slides are in Spanish Material can be obtained from wikipedia (under the articles on matrices, linear algebra, ...) Another interesting source is Wolfram MathWorld (http://mathworld.wolfram.com) Several mathematical software packages provide implementation of the matrix operations and decompositions: Matlab (I have tested some features) Mapple Mathematica Introduction: marc general i la motivació d’aquest treball

Vectorial Spaces Vectorial Spaces Metric Spaces dimension Bases Sub-spaces Kernel Image Linear maps Ortogonal base Metric Spaces Ortonormal base Matrix representation of a Linear map Basic operations on matrices

Basic concepts Matriz hermítica (autoadjunta) Matriz normal A = A* , A es igual a la conjugada de su traspuesta Una matriz real y simétrica es hermítica A* = AT Una matriz hermítica es normal Todos los valores propios son reales Los vectores propios correspondientes a valores propios distintos son ortogonales Es posible encontrar una base compuesta sólo por vectores propios Matriz normal A*A = AA* si A es real, ATA = AAT Matriz unitaria A*A = AA* = In si A es real, A unitaria  ortogonal Introduction: marc general i la motivació d’aquest treball

Transpose of a matrix The transpose of a matrix A is another matrix AT created by any one of the following equivalent actions: write the rows of A as the columns of AT write the columns of A as the rows of AT reflect A by its main diagonal (which starts from the top left) to obtain AT Introduction: marc general i la motivació d’aquest treball

Positive definite matrix For complex matrices, a positive-definite matrix is a (Hermitian) matrix if z*Mz > 0 for all non-zero complex vectors z. The quantity z*Mz is always real because M is a Hermitian matrix. For real matrices, an n × n real symmetric matrix M is positive definite if zTMz > 0 for all non-zero vectors z with real entries (i.e. z ∈ Rn). A Hermitian (or symmetric) matrix is positive-definite iff all its eigenvalues are > 0. Introduction: marc general i la motivació d’aquest treball

Bloc decomposition Algunos conceptos a recordar de Álgebra Matricial Descomposición de una matriz en bloques bloques rectangulares Introduction: marc general i la motivació d’aquest treball

Bloc decomposition Descomposición de una matriz en bloques Suma directa A  B, A m  n, B p  q Block diagonal matrices (cuadradas) Introduction: marc general i la motivació d’aquest treball

Matrix decomposition Different decompositions are used to implement efficient matrix algorithms.. For instance, when solving a system of linear equations Ax = b, the matrix A can be decomposed via the LU decomposition. The LU decomposition factorizes a matrix into a lower triangular matrix L and an upper triangular matrix U. The systems L(Ux) = b and Ux = L − 1b are much easier to solve than the original. Matrix decomposition at wikipedia: Decompositions related to solving systems of linear equations Decompositions based on eigenvalues and related concepts Introduction: marc general i la motivació d’aquest treball

LU decomposition Descomposiciones de matrices A matriz cuadrada compleja n  n A = LU L lower triangular U upper triangular LDU A = LDU L unit lower triangular (las entradas de la diagonal son 1) U unit upper triangular (las entradas de la diagonal son 1) D matriz diagonal LUP A = LUP P matriz permutación sólo 0 ó 1 con un solo 1 en cada fila y columna Introduction: marc general i la motivació d’aquest treball

LU decomposition Existence Applications An LUP decomposition exists for any square matrix A When P is an identity matrix, the LUP decomposition reduces to the LU decomposition. If the LU decomposition exists, the LDU decomposition does too. Applications The LUP and LU decompositions are useful in solving an n-by-n system of linear equations Ax = b Introduction: marc general i la motivació d’aquest treball

Cholesky decomposition Descomposiciones de matrices Cholesky A hermítica, definida positiva y, por lo tanto, a matrices cuadradas,reales, simétricas, definidas positivas A = LL* o equivalentemente A = U*U L lower triangular con entradas en la diagonal estrictamente positivas the Cholesky decomposition is a special case of the symmetric LU decomposition, with L = U* (or U=L*). the Cholesky decomposition is unique Introduction: marc general i la motivació d’aquest treball

Cholesky decomposition Cholesky decomposition in Matlab A must be positive definite; otherwise, MATLAB displays an error message. Both full and sparse matrices are allowed syntax R = chol(A) L = chol(A,'lower') [R,p] = chol(A) [L,p] = chol(A,'lower') [R,p,S] = chol(A) [R,p,s] = chol(A,'vector') [L,p,s] = chol(A,'lower','vector') Introduction: marc general i la motivació d’aquest treball

Cholesky decomposition Example The binomial coefficients arranged in a symmetric array create an interesting positive definite matrix. n = 5 X = pascal(n) X = 1 1 1 1 1 1 2 3 4 5 1 3 6 10 15 1 4 10 20 35 1 5 15 35 70 Introduction: marc general i la motivació d’aquest treball

Cholesky decomposition Example It is interesting because its Cholesky factor consists of the same coefficients, arranged in an upper triangular matrix. R = chol(X) R = 1 1 1 1 1 0 1 2 3 4 0 0 1 3 6 0 0 0 1 4 0 0 0 0 1 Introduction: marc general i la motivació d’aquest treball

Cholesky decomposition Example Destroy the positive definiteness by subtracting 1 from the last element. X(n,n) = X(n,n)-1 X = 1 1 1 1 1 1 2 3 4 5 1 3 6 10 15 1 4 10 20 35 1 5 15 35 69 Now an attempt to find the Cholesky factorization fails. Introduction: marc general i la motivació d’aquest treball

QR decomposition QR A real matrix m  n A = QR R upper triangular m  n Q ortogonal (QQT = I) m  m similarmente QL RQ LQ Si A es no singular (invertible) la factorización es única si los elementos de la diagonal principal de R han de ser positivos Proceso de ortonormalización de Gram-Schmidt Introduction: marc general i la motivació d’aquest treball

QR decomposition QR in matlab: Syntax [Q,R] = qr(A) (full and sparse matrices) [Q,R] = qr(A,0) (full and sparse matrices) [Q,R,E] = qr(A) (full matrices) [Q,R,E] = qr(A,0) (full matrices) X = qr(A) (full matrices) R = qr(A) (sparse matrices) [C,R] = qr(A,B) (sparse matrices) R = qr(A,0) (sparse matrices) [C,R] = qr(A,B,0) (sparse matrices) Introduction: marc general i la motivació d’aquest treball

QR decomposition example: A = [1 2 3 4 5 6 7 8 9 10 11 12 ] This is a rank-deficient matrix; the middle column is the average of the other two columns. The rank deficiency is revealed by the factorization: [Q,R] = qr(A) Q = -0.0776 -0.8331 0.5444 0.0605 -0.3105 -0.4512 -0.7709 0.3251 -0.5433 -0.0694 -0.0913 -0.8317 -0.7762 0.3124 0.3178 0.4461 R = -12.8841 -14.5916 -16.2992 0 -1.0413 -2.0826 0 0 0.0000 0 0 0 The triangular structure of R gives it zeros below the diagonal; the zero on the diagonal in R(3,3) implies that R, and consequently A, does not have full rank. Introduction: marc general i la motivació d’aquest treball

Projection Proyección P tal que P2 = P (idempotente) Una proyección proyecta el espacio W sobre un subespacio U y deja los puntos del subespacio inalterados x  U, rango de la proyección: Px = x x  V, espacio nulo de la proyección: Px = 0 W = U  V, U y V son complementarios Los únicos valores propios son 0 y 1, W0 = V, W1 = U Proyecciones ortogonales: U y V son ortogonales Introduction: marc general i la motivació d’aquest treball

Centering matrix matriz simétrica e idempotente que multiplicada por un vector tiene el mismo efecto que restar a cada componente del vector la media de sus componentes In matriz identidad de tamaño n 1 vector columna de n unos Cn = In -1/n 11T Introduction: marc general i la motivació d’aquest treball

Eigendecomposition especial case of linear map are endomorphisms i.e. maps f: V → V. In this case, vectors v can be compared to their image under f, f(v). Any vector v satisfying λ · v = f(v), where λ is a scalar, is called an eigenvector of f with eigenvalue λ v is an element of kernel of the difference f − λ · I In the finite-dimensional case, this can be rephrased using determinants f having eigenvalue λ is the same as det (f − λ · I) = 0 characteristic polynomial of f The vector space V may or may not possess an eigenbasis, i.e. a basis consisting of eigenvectors. This phenomenon is governed by the Jordan canonical form of the map. The spectral theorem describes the infinite-dimensional case Introduction: marc general i la motivació d’aquest treball

Eigendecomposition Decomposition of a matrix A into eigenvalues and eigenvectors Each eigenvalue is paired with its corresponding eigenvector This decomposition is often named matrix diagonalization nondegenerate eigenvalues 1 ... n D is the diagonal matrix formed with the set of eigenvalues linearly independent eigenvectors X1 ... Xn P is the matrix formed with the columns corresponding to the set of eigenvectors AX = X if the n eigenvalues are distinct, P is invertible A = PDP-1 Introduction: marc general i la motivació d’aquest treball

Eigendecomposition Teorema espectral Diagonalización condiciones para que una matriz sea diagonalizable A matriz hermítica en un espacio V (complejo o real) dotado de un producto interior <Ax|y> = <x|Ay> Existe una base ortonormal de V consistente en vectores propios de A. Los valores propios son reales Descomposición espectral de A para cada valor propio diferente  V={vV: Av=v} V es la suma directa de los V Diagonalización si A es normal (y por tanto si es hermítica y por tanto si es real simétrica) entonces existe una descomposición A = U  U*  es diagonal, sus entradas son los valores propios de A U es unitaria, sus columnas son los vectores propios de A Introduction: marc general i la motivació d’aquest treball

Eigendecomposition Caso de matrices no simétricas Si A es real rk right eigenvectors Ark = rk lk left eigenvectors lkA = lk Si A es real ATlk= lk Si A es simétrica rk = lk Introduction: marc general i la motivació d’aquest treball

Eigendecomposition Eigendecomposition in Matlab Syntax d = eig(A) d = eig(A,B) [V,D] = eig(A) [V,D] = eig(A,'nobalance') [V,D] = eig(A,B) [V,D] = eig(A,B,flag) Introduction: marc general i la motivació d’aquest treball

Jordan Normal Form Jordan normal form una matriz cuadrada A n  n es diagonalizable ssi la suma de las dimensiones de sus espacios propios es n  tiene n vectores propios linealmente independientes No todas las matrices son diagonalizables dada A existe siempre una matriz P invertible tal que A = PJP-1 J tiene entradas no nulas sólo en la diagonal principal y la diagonal superior J está en forma normal de Jordan Introduction: marc general i la motivació d’aquest treball

Jordan Normal Form Example Consider the following matrix: The characteristic polynomial of A is: eigenvalues are 1, 2, 4 and 4 The eigenspace corresponding to the eigenvalue 1 can be found by solving the equation Av = v. So, the geometric multiplicity (i.e. dimension of the eigenspace of the given eigenvalue) of each of the three eigenvalues is one. Therefore, the two eigenvalues equal to 4 correspond to a single Jordan block, Introduction: marc general i la motivació d’aquest treball

Jordan Normal Form Example The Jordan normal form of the matrix A is the direct sum of the three Jordan blocs The matrix J is almost diagonal. This is the Jordan normal form of A. Introduction: marc general i la motivació d’aquest treball

Schur Normal Form Descomposiciones de matrices A matriz cuadrada compleja n  n A = QUQ* Q unitaria Q* traspuesta conjugada de Q U upper triangular Las entradas de la diagonal de U son los valores propios de A Introduction: marc general i la motivació d’aquest treball

SVD Descomposiciones de matrices Generalización del teorema espectral M matriz m  n M = U  V* U m  m unitary ortonormal input V n  n unitary ortonormal output V* transpuesta conjugada de V  matriz diagonal con entradas no negativas valores propios Mv = u, M*u = v,  valor propio, u left singular vector, v right singular vector Las columnas de U son los vectores propios u Las columnas de V son los vectores propios v Aplicación a la reducción de la dimensionalidad Principal Components Analysis Introduction: marc general i la motivació d’aquest treball