Mostrando entradas con la etiqueta cálculo con matrices. Mostrar todas las entradas
Mostrando entradas con la etiqueta cálculo con matrices. Mostrar todas las entradas

domingo, 4 de octubre de 2020

Tarea de progresión número 1 de la semana del 5 al 11 de octubre

. Ejercicio número 13 de la página 35 del libro base
. Ejercicio número 14 de la página 35 del libro base
. Ejercicio número 19 de la página 37 del libro base
. Ejercicio número 20 de la página 37 del libro base

SOLUCIONES.
La siguiente lista de reproducción consta de 2 vídeos; el primero trata de los ejercicios 13 y 14, y el segundo de los ejercicios 19 y 20. Tras finalizar el primero, se reproduce automáticamente el segundo.

FE DE ERRATAS: En el tercer paso del problema 19, el último elemento de la matriz elevada al cubo tiene que ser un '3' y no un '4' ( al transcribirlo a la pantalla me equivoqué, aunque los cálculos podéis comprobar que son correctos ). Y, también, al final al referirme al único elemento que varía, me refiero a él como el elemento "(...) de la esquina superior derecha", cuando debería haber dicho "(...) al elemento de la esquina inferior derecha". Esas cosas pasan de vez en cuando en las grabaciones. Y más a estas horas de la noche. Disculpas.

Tarea de progresión número 2 de la semana del 12 al 18 de octubre

Ejercicio 1.
ENUNCIADO.
Se consideran las matrices
$$A=\begin{pmatrix}3&1\\\;-6&-2\end{pmatrix}$$ y $$B=\begin{pmatrix}1&-3\\\;-1&2\end{pmatrix}$$ a) Calcúlese $A^{15}$ e indíquese si la matriz $A$ tiene inversa.
b) Calcúlese el determinante de la matriz $(B\,A^t\,B^{-1}-2\,I)^3$
Nota: $A^t$ denota la matriz traspuesta de $A$ e $I$ es la matriz identidad de orden $2$


SOLUCIÓN.
a) Obsérvese que $A^2=\begin{pmatrix}3&1\\\;-6&-2\end{pmatrix}\begin{pmatrix}3&1\\\;-6&-2\end{pmatrix}=\begin{pmatrix}3&1\\\;-6&-2\end{pmatrix}$, luego $A^{n}=A$ para todo entero $n$ positivo. Decimos que la matriz $A$ es idempotente. Por otra parte, como el determinante de B, $B=\begin{vmatrix}1&-3\\\;-1&2\end{vmatrix}=2\cdot 1-(-1)\cdot (-3)=2-3=-1\neq 0$, el rango de $B$ es $2$ - también puede verse esto reduciendo la matriz por Gauss y contando el número de filas no identicamente nulas, que es $2$ -, luego $B$ es una matriz regular (inversible) y éste es igual al orden de la matriz ( $n=2$ ), luego $B$ es una matriz regular (inversible).

b) Como $A=\begin{pmatrix}3&1\\\;-6&-2\end{pmatrix}$, entonces cambiando filas por columnas, en el mismo orden obtenemos la matriz traspuesta, $A^t=\begin{pmatrix}3&-6\\\;1&-2\end{pmatrix}$. Por otra parte, empleando el método de Gauss-Jordan llegamos fácilmente a calcular la matriz inversa de $B$, obteniendo ( omito el cálculo ) $B^{-1}=\begin{pmatrix}2&-3\\\;-1&-1\end{pmatrix}$. Así, $$B\,A^t\,B^{-1}-2\,I=\begin{pmatrix}1&-3\\\;-1&2\end{pmatrix}\begin{pmatrix}3&-6\\\;1&-2\end{pmatrix}\begin{pmatrix}2&-3\\\;-1&-1\end{pmatrix}-2\,\begin{pmatrix}1&0\\0&1\end{pmatrix}=$$   $=\begin{pmatrix}1&-3\\\;-1&2\end{pmatrix}\begin{pmatrix}3&-6\\\;1&-2\end{pmatrix}\begin{pmatrix}2&-3\\\;-1&-1\end{pmatrix}-\begin{pmatrix}2&0\\0&2\end{pmatrix}=\ldots=\begin{pmatrix}-2&0\\0&-1\end{pmatrix}$, con lo cual $(B\,A^t\,B^{-1}-2\,I)^3=\begin{pmatrix}-2&0\\0&-1\end{pmatrix}\begin{pmatrix}-2&0\\0&-1\end{pmatrix}\begin{pmatrix}-2&0\\0&-1\end{pmatrix}=$ $$=\ldots=\begin{pmatrix}(-2)^3&0\\0&(-1)^3\end{pmatrix}=\begin{pmatrix}-8&0\\0&-1\end{pmatrix}$$ $\square$
-oOo-

Ejercicio 2. ENUNCIADO Determínese la matriz $X$ que verifica: $$\begin{pmatrix}3&1\\-1&2\end{pmatrix}\,X\,=\begin{pmatrix}2&0\\1&4\end{pmatrix}-\begin{pmatrix}1&0\\4&-1\end{pmatrix}\,X$$

SOLUCIÓN.
En primer lugar, observemos que, para que se pueda cumplir la igualdad, $X$ ha de ser una matriz de orden $2$ ( $2 \times 2$ ). Procedemos ahora a realizar los pasos algebraicos para obtener los coeficientes de dicha matriz:
$\begin{pmatrix}3&1\\-1&2\end{pmatrix}\,X\,=\begin{pmatrix}2&0\\1&4\end{pmatrix}-\begin{pmatrix}1&0\\4&-1\end{pmatrix}\,X$   $ \begin{pmatrix}3&1\\-1&2\end{pmatrix}\,X + \begin{pmatrix}1&0\\4&-1\end{pmatrix}\,X=\begin{pmatrix}2&0\\1&4\end{pmatrix}$     $ \left( \begin{pmatrix}3&1\\-1&2\end{pmatrix} + \begin{pmatrix}1&0\\4&-1\end{pmatrix}\right)\,X=\begin{pmatrix}2&0\\1&4\end{pmatrix}$
      $ \begin{pmatrix}4&1\\3&1\end{pmatrix}\,X=\begin{pmatrix}2&0\\1&4\end{pmatrix}$
        $ \text{inversa}\,\begin{pmatrix}4&1\\3&1\end{pmatrix} \begin{pmatrix}4&1\\3&1\end{pmatrix}\,X=\text{inversa}\,\begin{pmatrix}4&1\\3&1\end{pmatrix}\begin{pmatrix}2&0\\1&4\end{pmatrix}$
          $ \begin{pmatrix}1&0\\0&1\end{pmatrix}\,X=\text{inversa}\,\begin{pmatrix}4&1\\3&1\end{pmatrix}\begin{pmatrix}2&0\\1&4\end{pmatrix}$
            $ X_{3\times 3}=\text{inversa}\,\begin{pmatrix}4&1\\3&1\end{pmatrix}\begin{pmatrix}2&0\\1&4\end{pmatrix}$
              Y como ( omito los cálculos ) $\text{inversa}\,\begin{pmatrix}4&1\\3&1\end{pmatrix}\overset{\text{Gauss-Jordan}}{=}\begin{pmatrix}1/7&1/7\\-3/7&4/7\end{pmatrix}$
                $ X_{3\times 3}=\begin{pmatrix}1/7&1/7\\-3/7&4/7\end{pmatrix}\begin{pmatrix}2&0\\1&4\end{pmatrix}$
                  $ X_{3\times 3}=\begin{pmatrix}3/7&4/7\\-2/7&16/7\end{pmatrix}$
$\square$
-oOo-

Ejercicio 3.
ENUNCIADO.
Sean las siguientes matrices :
$$A=\begin{pmatrix}1&0\\-1&1\end{pmatrix}$$ $$B=\begin{pmatrix}0&1\\1&0\end{pmatrix}$$ $$C=\begin{pmatrix}1&-1\\2&0\end{pmatrix}$$ $$I=\begin{pmatrix}1&0\\0&1\end{pmatrix}$$
Se pide resolver las siguientes ecuaciones matriciales:
a) $XA+B=I$
b) $AX+B=C$
c) $A+BX=3C$
d) $AX+BX=C$
e) $XAB-XC=4C$


SOLUCIÓN.
a)
$XA+B=I$
  $XA=I-B$
    $XAA^{-1}=(I-B)A^{-1}$
      $XI=(I-B)A^{-1}$
        $X=(I-B)A^{-1}$     (1)
Calculando $A^{-1}$ por el método de Gauss-Jordan se obtiene $A^{-1}=\begin{pmatrix}1&0\\1&1\end{pmatrix}$
Por otro lado, $$I-B=\begin{pmatrix}1&0\\0&1\end{pmatrix}+(-1)\,\begin{pmatrix}0&1\\1&0\end{pmatrix}=\begin{pmatrix}1&0\\0&1\end{pmatrix}+\begin{pmatrix}0&-1\\-1&0\end{pmatrix}=\begin{pmatrix}1&-1\\-1&1\end{pmatrix}$$ Así pues, de (1): $$X=\begin{pmatrix}1&-1\\-1&1\end{pmatrix}\begin{pmatrix}1&0\\1&1\end{pmatrix}=\begin{pmatrix}0&-1\\0&1\end{pmatrix}$$
b)
$AX+B=C$
  $AX=C-B$
    $A^{-1}AX=A^{-1}(C-B)$
      $IX=A^{-1}(C-B)$
        $X=A^{-1}(C-B)$     (1)
...
c)
$A+BX=3C$
  $BX=3C-A$
    $B^{-1}BX=B^{-1}(3C-A)$
      $IX=B^{-1}(3C-A)$
        $X=B^{-1}(3C-A)$     (2)
...
d)
$AX+BX=C$
  $(A+B)X=C$
    $A+B\overset{.}{=}D$
      $DX=C$
        $D^{-1}DX=D^{-1}C$
          $IX=D^{-1}C$
            $X=D^{-1}C$     (3)
...
e)
$XAB-XC=4C$
  $X(AB-C)=4C$
    $X(AB+(-1)C)=4C$
      $AB+(-1)C\overset{.}{=}E$
        $XE=4C$
          $XDD^{-1}=4CE^{-1}$
            $XI=4CE^{-1}$
              $X=4CE^{-1}$     (4)
... Para hacer estos cálculos, necesitamos calcular $A^{-1}$, $B^{-1}$, $D^{-1}$ y $E^{-1}$. Empleando el método de Gauss-Jordan ( omito los cálculos ) se obtiene: $A^{-1}=\ldots=\begin{pmatrix}1&0\\1&1\end{pmatrix}$, $B^{-1}=\ldots=\begin{pmatrix}0&1\\1&0\end{pmatrix}$ y $D^{-1}=\ldots=\begin{pmatrix}1&0\\0&1\end{pmatrix}$
Luego operando con las expresiones (1), (2), (3) y (4) obtenidas arriba y con las matrices que nos dan como datos, se obtiene:
a) Ya lo hemos calculado arriba. Recordemos que habíamos obtenido $X_a=\begin{pmatrix}0&-1\\0&1\end{pmatrix}$
$X_b=\ldots=\begin{pmatrix}1&-2\\2&-2\end{pmatrix}$
$X_c=\ldots=\begin{pmatrix}7&-1\\2&-3\end{pmatrix}$
$X_d=\ldots=\begin{pmatrix}-1&-1\\2&0\end{pmatrix}$
$X_e=\ldots=\begin{pmatrix}-8/3&-4/3\\-8/3&-16/3\end{pmatrix}$
$\square$
-oOo-

Ejercicio 4.
ENUNCIADO.
Sea la matriz de orden $n=3$ $$\begin{pmatrix}1&3&1\\1&0&8\\a&1&-6\end{pmatrix}$$ a) ¿ Para qué valores del parámetro $a$ esta matriz es regular (inversible) ?
b) Resolver el siguiente sistema de ecuaciones homogéneo - Se denominan así los sistemas de ecuaciones en los que los terminos independientes son nulos - para $$a:=-1$$
$$\begin{pmatrix}1&3&1\\1&0&8\\-1&1&-6\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}$$ br>
SOLUCIÓN.
a)
Reduciendo la matriz por Gauss para determinar el rango vemos que: $\begin{pmatrix}1&3&1\\1&0&8\\a&1&-6\end{pmatrix} \begin{matrix}\\ -f_1+f_2 \rightarrow f_2 \\ -af_2+f_3 \rightarrow f_3 \end{matrix} \sim \begin{pmatrix}1&3&1\\0&-3&7\\0&1&-(8a+6)\end{pmatrix} \begin{matrix}\\ \\ 3f_3+f_2\rightarrow f_3\end{matrix}\sim$

$\begin{pmatrix}1&3&1\\0&-3&7\\0&0&-3(8a+6)+7\end{pmatrix}$
Para que el elemento de la tercera fila y tercera columna sea $0$ ( el rango de la matriz será $2 \prec n=3$ ) vemos que $a=-\dfrac{11}{24}$ ( resolviendo la ecuación $-3(8a+6)+7=0$ ), luego si $a \neq -\dfrac{11}{24}$ el rango de la matriz es $3$ y coincidirá con el orden de la misma, con lo cual la matriz es regular ( inversible ) para cualquier número real de $a$ salvo para $-\dfrac{11}{24}$.

b) Resolveremos el sistema por el método de la matriz inversa. Siendo $A=\begin{pmatrix}1&3&1\\1&0&8\\-1&1&-6\end{pmatrix}$, $X=\begin{pmatrix}x\\y\\z\end{pmatrix}$ y $C=\begin{pmatrix}0\\0\\0\end{pmatrix}$, podemos escribir el sistema de ecuaciones de manera suscinta: $AX=B$, con lo cual $A^{-1}AX=A^{-1}B$, esto es $IX=A^{-1}B$, y por tanto, $X=A^{-1}B$. Así pues, necesitamos calcular la matriz inversa de A, $A^{-1}$. Empleando el método de Gauss-Jordan, cuyos calculos omitiré, se obtiene:
$$A^{-1}=\ldots=\begin{pmatrix}8/13&-19/13&-24/13\\2/13&5/13&7/13\\-1/13&4/13&-3/13\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}$$ luego $X\equiv\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}8/13&-19/13&-24/13\\2/13&5/13&7/13\\-1/13&4/13&-3/13\end{pmatrix}\begin{pmatrix}0\\0\\0\end{pmatrix}=\begin{pmatrix}0\\0\\0\end{pmatrix}$ y por tanto $x=y=z=0$. El sistema es compatible determinado y la solución es única, y, siendo el sistema homogéneo, és lógico que esta solución - que es una solución trivial - sea la única. $\square$

miércoles, 16 de septiembre de 2020

Ejercicio A.1 de la prueba EvAU de la CAM propuesto en la convocatoria de Septiembre de 2020

ENUNCIADO. Dada la matriz $A=\begin{pmatrix}2 & 5\,a \\ a & 3\end{pmatrix}$, con $a \in \mathbb{R}$, se pide:
a) Los valores del parámetro $a$ para que se verifique la igualdad $A^2-5A=-I$, siendo $I$ la matriz identidad
b) La matriz inversa $A^{-1}$ para $a:=-1$

SOLUCIÓN.
a) Según el enunciado, deberá cumplirse que

$\begin{pmatrix}2 & 5\,a \\ a & 3\end{pmatrix}\,\begin{pmatrix}2 & 5\,a \\ a & 3\end{pmatrix}-5\,\begin{pmatrix}2 & 5\,a \\ a & 3\end{pmatrix}=-\begin{pmatrix}1 & 0 \\ 0 & 1 \end{pmatrix}$
luego

$\begin{pmatrix}5a^2+4 & 25\,a \\ 5\,a & 5\,a^2+9\end{pmatrix}+\begin{pmatrix}-10 & -25\,a \\ -5\,a & -15\end{pmatrix}=\begin{pmatrix}-1 & 0 \\ 0 & -1\end{pmatrix}$
esto es

$\begin{pmatrix}5a^2-6 & 0 \\ 0 & 5\,a^2-6\end{pmatrix}=\begin{pmatrix}-1 & 0 \\ 0 & -1\end{pmatrix} \Leftrightarrow 5\,a^2-6=-1 \Leftrightarrow 5\,a^2=5 \Leftrightarrow a=\pm1$
b) Para $a:=-1$ se tiene que $A=\begin{pmatrix} 2 & -5 \\ -1 & 3 & \end{pmatrix}$ y $\text{det}(A)=3\cdot 2- (-5)\cdot (-1)=1 \neq 0$, luego hay una matriz inversa $A^{-1}$ asociada a $A$ ( que, como se sabe, es única)
Procedamos a calcular $A^{-1}$ por el método de Gauss-Jordan:
$\left(\begin{array}{cc|cc} 2 & -5 & 1 & 0 \\ -1 & 3 & 0 & 1 \end{array}\right) \quad \overset{f_1+2\cdot f_2\rightarrow f_2}{\rightarrow} \quad \left(\begin{array}{cc|cc} 2 & -5 & 1 & 0 \\ 0 & 1 & 1 & 2 \end{array}\right) \quad \overset{f_1+5\cdot f_2\rightarrow f_1}{\rightarrow} \quad$

$\left(\begin{array}{cc|cc} 2 & 0 & 6 & 10 \\ 0 & 1 & 1 & 2 \end{array}\right) \quad \overset{\dfrac{1}{2}\cdot f_1 \rightarrow f_1}{\rightarrow} \quad \left(\begin{array}{cc|cc} 1 & 0 & 3 & 5 \\ 0 & 1 & 1 & 2 \end{array}\right) \quad \Rightarrow \quad A^{-1}=\begin{pmatrix}3 & 5 \\ 1 & 2\end{pmatrix}$

Nota: Puede comprobarse que $A\,A^{-1}=A^{-1}\,A=I$, como debe ser.

$\square$

jueves, 13 de junio de 2019

Álgebra lineal. Cálculo con matrices

ENUNCIADO. Se consideran las siguientes matrices:
$A=\begin{pmatrix}k&1&2 \\ 1& 4& 4 \\ 0&0&7\end{pmatrix}$, $B=\begin{pmatrix}1&0&1 \\ 0& 1& 0 \\ 4&0&3\end{pmatrix}$ y $C=\begin{pmatrix}1&1 \\ 0& -1 \\ 1&0\end{pmatrix}$ Se pide:
a) Obténgase el valor de $k\in \mathbb{R}$ para que la matiz $A-2\,B$ sea regular
b) Determínese si las matrices $C$ y $C^{t}C$ son inversibles. En caso afirmativo, calcúlense las inversas

SOLUCIÓN.
a) $$A-2\,B = \begin{pmatrix}k&1&2 \\ 1& 4& 4 \\ 0&0&7\end{pmatrix} - \begin{pmatrix}2&0&2 \\ 0& 2& 0 \\ 8&0&6\end{pmatrix}=\begin{pmatrix}k-2&1&0 \\ 1& 2& 4 \\ -8&0&1\end{pmatrix}$$ luego la matriz $A-2B$ no es regular ( no es inversible ) en el caso de que $$\text{det}\,(A-2\,B)=\begin{vmatrix}k-2&1&0 \\ 1& 2&4 \\ -8&0&1\end{vmatrix}=2k-37=0\Leftrightarrow k=\dfrac{37}{2}$$ Por consiguiente, la matriz $A-2B$ es regular ( inversible ) si $k$ toma cualquier valor distinto de $\dfrac{37}{2}$.

b)
  $C$ es una matriz $3\times 2$ y por tanto no es cuadrada, en consecuencia no es inversible.

  $(C^t)_{2\times 3}\,C_{3\times 2} \rightarrow \text{matrix}\, 2\times 2$; procedamos realizar el producto: $$C^t\,C=\begin{pmatrix}1&0&1 \\ 1&-1&0\end{pmatrix}\,\begin{pmatrix}1&1 \\ 0& -1 \\ 1&0\end{pmatrix}=\begin{pmatrix}2&1 \\ 1&2\end{pmatrix}$$
Para que esta matriz sea inversible su determinante ha de ser distinto de cero. Veamos que, en efecto, lo es: $$\begin{vmatrix}2&1 \\ 1&2\end{vmatrix}=2\cdot 2-1\cdot 1=3\neq 0$$
Calculemos pues la matriz inversa asociada a $C^t\,C$. Emplearemos el método de reducción Gauss-Jordan.
$\left(\begin{array}{cc|cc} 2 & 1 & 1 & 0 \\ 1 & 2 & 0 & 1\end{array}\right) \overset{-2f_1+f_1\,\rightarrow f_2}{\rightarrow} \left(\begin{array}{cc|cc} 2 & 1 & 1 & 0 \\ 0 & -3 & 1 & -2\end{array}\right) \overset{3f_1+f_2\,\rightarrow f_1}{\rightarrow} \left(\begin{array}{cc|cc} 6 & 0 & 4 & -2 \\ 0 & -3 & 1 & -2\end{array}\right)$
$ \overset{(1/6)\,f_1 \,\rightarrow f_1\,,\,(-1/3)\,f_2 \,\rightarrow f_2}{\rightarrow} \left(\begin{array}{cc|cc} 1 & 0 & 4/6 & -2/6 \\ 0 & 1 & -1/3 & 2/3\end{array}\right)$
luego $$(C^t\,C)^{-1}=\begin{pmatrix}2/3&-1/3\\-1/3&2/3\end{pmatrix}$$
$\square$

sábado, 9 de junio de 2018

Álgebra lineal. Cálculo con matrices

ENUNCIADO. Se consideran las matrices $A=\begin{pmatrix}3&1\\8&3\end{pmatrix}$ y $B=\begin{pmatrix}3&-1\\-8&3\end{pmatrix}$
a) Compruébese que $B$ es la matriz inversa de $A$
b) Calcúlese la matriz $X$ tal que $AX=B$

SOLUCIÓN.
a) Veamos si $AB=BA=I$. Bastará con comprobar que $AB=I$. En efecto,
$AB=\begin{pmatrix}3&1\\8&3\end{pmatrix}\begin{pmatrix}3&-1\\-8&3\end{pmatrix}=\begin{pmatrix}3\cdot 3+1\cdot (-8)&3\cdot(-1)+1\cdot 3\\8\cdot 3+3\cdot (-8)&8\cdot (-1)+3\cdot 3\end{pmatrix}=\begin{pmatrix}1&0\\0&1\end{pmatrix}$
Así pues $A^{-1}=B$

b)
$AX=B$
  $A^{-1}AX=A^{-1}B$
    $IX=A^{-1}B$
      $X=A^{-1}B$
        $X\overset{\text{(apartado a)}}{=}BB=\begin{pmatrix}3&-1\\-8&3\end{pmatrix}\begin{pmatrix}3&-1\\-8&3\end{pmatrix}=$

          $=\begin{pmatrix}3\cdot 3+(-1)\cdot (-8)&3\cdot (-1)+(-1)\cdot 3\\-8\cdot 3+3\cdot (-8)&-8\cdot (-1)+3\cdot 3\end{pmatrix}=\begin{pmatrix}17&-6\\-48&17\end{pmatrix}$
$\square$

viernes, 22 de septiembre de 2017

Cáculo con matrices

ENUNCIADO. Considérense las matrices $$A=\begin{pmatrix}1 & -2 \\ -1 & 1\end{pmatrix}$$ $$B=\begin{pmatrix}1 & 3 \\ 2 & -1\end{pmatrix}$$ $$C=\begin{pmatrix}-1 & 0 \\ 3 & 1\end{pmatrix}$$ Se pide:
a) la matriz $C^{40}$
b) la matriz $X$ que verifica $X\cdot A+3\,B=C$

ENUNCIADO.
a)
Observemos que $C^2=\begin{pmatrix}-1 & 0 \\ 3 & 1\end{pmatrix}\,\begin{pmatrix}-1 & 0 \\ 3 & 1\end{pmatrix}=\begin{pmatrix}1 & 0 \\ 0 & 1\end{pmatrix}=I$, luego el período es $2$, luego $C^{40}=C^r$, donde $r=\text{residuo}(40\div 2)=0$; por tanto $C^{40}=C^0=I=\begin{pmatrix}1 & 0 \\ 0 & 1\end{pmatrix}$

b)
$XA+3B=C$
  $XA+3B-3B=C-3B$
    $XA+O=C-3B$
      $XA=C-3B$
        $XAA^{-1}=(C-3B)A^{-1}$
          $XI=(C-3B)A^{-1}$
            $X=(C-3B)A^{-1}$
              $X\overset{(1),(2))}{=}\begin{pmatrix}-4 & -9 \\ -3 & 4\end{pmatrix}\begin{pmatrix}-1&-2 \\ -1 & -1\end{pmatrix}=\begin{pmatrix}13&17 \\ -1 & 2\end{pmatrix}$

-oOo-

Cálculos:

(1)     $C-3B=\begin{pmatrix}-1 & 0 \\ 3 & 1\end{pmatrix}-3\,\begin{pmatrix}1 & 3 \\ 2 & -1\end{pmatrix}=\begin{pmatrix}-4 & -9 \\ -3 & 4\end{pmatrix}$

(2)   Cálculo de la matriz inversa de $C$ por el método de Gauss-Jordan: $(A|I) \rightarrow (I|A^{-1}$
$\left(\begin{array}{cc|cc}1&-2&1&0 \\ -1& 1 & 0 & 1 \end{array}\right) \overset{f_1+f_2\,\rightarrow f_2}{\sim} \left(\begin{array}{cc|cc}1&-2&1&0 \\ 0& -1 & 1 & 1 \end{array}\right)\overset{-2\,f_2+f_1\,\rightarrow f_1}{\sim}$
  $\sim \left(\begin{array}{cc|cc}1&0&-1&-2 \\ 0& -1 & 1 & 1 \end{array}\right)\overset{-1\,f_2\,\rightarrow f_2}{\sim}\left(\begin{array}{cc|cc}1&0&-1&-2 \\ 0& 1 & -1 & -1 \end{array}\right)$
Así pues $$A^{-1}=\begin{pmatrix}-1&-2 \\ -1 & -1\end{pmatrix}$$

$\square$

miércoles, 6 de septiembre de 2017

Cálculo con matrices. Matriz inversa. Determinante de una matriz cuadrada

ENUNCIADO. Considérense las matrices $A=\begin{pmatrix}1&2&-k \\ 1&-2&1 \\ k&2&-1 \end{pmatrix}$ y $B=\begin{pmatrix}1&1&1 \\ 0&2&2 \\ 0&0&3 \end{pmatrix}$
a) Discútase para qué valores del parámetro $k$ la matriz $A$ tiene matriz inversa
b) Determínese, para $k=0$, la matriz $X$ que verifica la ecuación $AX=B$

SOLUCIÓN.
a) Una matriz cuadrada tiene inversa si y sólo si su determinante es nulo. Impongamos que el determinante de $A$ sea nulo y resolvamos la ecuación resultante; su solución corresponderá a los valores de $k$ para los cuales $A$ no admite matriz inversa:
$$\begin{vmatrix}1&2&-k \\ 1&-2&1 \\ k&2&-1 \end{vmatrix} \Leftrightarrow 2\,(1-k^2)=0 \Leftrightarrow k=\pm1$$ Por lo que podemos afirmar que la matriz $A$ tiene inversa siempre que $k$ sea distinto de $\pm 1$

b) Si $k=0$, entonces $A$ es $\begin{pmatrix}1&2&0 \\ 1&-2&1 \\ 0&2&-1 \end{pmatrix}$. Notemos que si $AX=B$ entonces $X=A^{-1}B$; por tanto, debemos calcular la matriz inversa de $A$ para resolver la ecuación matricial, para lo cual podemos optar por emplear el método de Gauss-Jordan o bien el de la matriz adjunta. Los pormenores de dichos cálculos se han mostrado en muchos ejercicios que el lector puede consultar en este mismo blog [por ejemplo: (1),(2)], así que nos limitaremos a dar la solución, que es la siguiente $$A^{-1}=\begin{pmatrix}0&1&1 \\ 1/2&-1/2&-1/2 \\ 1&-1&-2 \end{pmatrix}$$ por tanto $$X=\begin{pmatrix}0&1&1 \\ 1/2&-1/2&-1/2 \\ 1&-1&-2 \end{pmatrix}\begin{pmatrix}1&1&1 \\ 0&2&2 \\ 0&0&3 \end{pmatrix}=\begin{pmatrix}0&2&5 \\ 1/2&-1/2&-2 \\ 1&-1&-7 \end{pmatrix}$$
$\square$

martes, 14 de junio de 2016

Cálculo con matrices

ENUNCIADO. Considérense las matrices
$A=\begin{pmatrix} 3 & 2 & 2 \\ 1 & 7 & 4 \\ 4 & 5 & 2 \end{pmatrix}$   $B=\begin{pmatrix} 2 & 1 \\ 5 & 3 \\ 0 & 1 \end{pmatrix}$   $C=\begin{pmatrix} 2 & 4 & 8 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix}$
a) Calcular el producto de matrices   $A\,C\,C^{\top}\,A^{-1}$
b) Calcular la matriz $M=A\,B$. ¿ Existe $M^{-1}$

SOLUCIÓN.
a)
$A\,C\,C^{\top}\,A^{-1}=((A\,C)\,C^{\top})\,A^{-1} \quad \quad (1)$ ( por la propiedad asociativa del producto de matrices )
Entonces,
$A\,C=\begin{pmatrix} 3 & 2 & 2 \\ 1 & 7 & 4 \\ 4 & 5 & 2 \end{pmatrix} \, \begin{pmatrix} 2 & 4 & 8 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 6 & 14 & 28 \\ 2 & 11 & 19 \\ 8 & 21 & 39 \end{pmatrix}$
Teniendo en cuenta que la matriz traspuesta de $C$ es $C^{\top}=\begin{pmatrix} 2 & 0 & 0 \\ 4 & 1 & 0 \\ 8 & 1 & 1 \end{pmatrix}$, tenemos que $(A\,C)\,C^{\top}=\begin{pmatrix} 6 & 14 & 28 \\ 2 & 11 & 19 \\ 8 & 21 & 39 \end{pmatrix} \, \begin{pmatrix} 2 & 0 & 0 \\ 4 & 1 & 0 \\ 8 & 1 & 1 \end{pmatrix} = \begin{pmatrix} 292 & 42 & 28 \\ 200 & 30 & 19 \\ 412 & 60 & 39 \end{pmatrix}$

Procedemos ahora a calcular la matriz inversa de $A$; para ello se aconseja emplear el método de Gauss-Jordan ( si bien también podemos emplear el método de la matriz adjunta ). Recordemos que el método de Gauss-Jordan consiste en realizar operaciones elementales de reducción al objeto de transformar $(A|I)$ en $(I|A)$. Omitimos los cálculos, pues ya los hemos explicado en muchas ocasiones ( por ejemplo en este otro ejercicio ), y damos directamente el resultado: $$A^{-1}=\begin{pmatrix} 1/6 & -1/6 & 1/6 \\ -7/18 & 1/18 & 15/18 \\ 23/36 & 7/36 & -19/36 \end{pmatrix}$$

Y, finalmente, ya podemos completar el cálculo (1),
$((A\,C)\,C^{\top})\,A^{-1}=\begin{pmatrix} 292 & 42 & 28 \\ 200 & 30 & 19 \\ 412 & 60 & 39 \end{pmatrix} \, \begin{pmatrix} 1/6 & -1/6 & 1/6 \\ -7/18 & 1/18 & 15/18 \\ 23/36 & 7/36 & -19/36 \end{pmatrix} =$
$$=\begin{pmatrix} 51 & -368/9 & 410/9 \\ 1217/36 & -1007/36 & 1139/36 \\ 281/4 & -231/4 & 259/4 \end{pmatrix}$$

b)
Antes de empezar el cálculo, notemos que el producto de matrices $A_{3\times 3}\,B_{3 \times 2}$, por lo que la matriz que resulta de ello, $M$, ha de ser de tamaño $3 \times 2$. Procedemos al cálculo: $$M=\begin{pmatrix} 3 & 2 & 2 \\ 1 & 7 & 4 \\ 4 & 5 & 2 \end{pmatrix} \, \begin{pmatrix} 2 & 1 \\ 5 & 3 \\ 0 & 1 \end{pmatrix}=\begin{pmatrix} 16 & 11 \\ 37 & 26 \\ 33 & 21 \end{pmatrix}$$

En respuesta a la segunda pregunta de este apartado: la matriz $M$ no es cuadrada, luego no está definida la matriz inversa para $M$.

$\square$