pip install nacal
Requirement already satisfied: nacal in /home/marcos/.local/lib/python3.9/site-packages (0.1.13) Requirement already satisfied: sympy>=1.1.0 in /usr/lib/python3/dist-packages (from nacal) (1.7.1) Note: you may need to restart the kernel to use updated packages.
from nacal import *
from IPython.display import display, Math
$ \renewcommand{\R}[1][{}]{{\mathbb{R}}^{#1}} \renewcommand{\Z}[1][{}]{{\mathbb{Z}}^{#1}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \renewcommand{\getitemR}[1]{\getItem{#1}} \renewcommand{\getItem}{\pmb{\mid}} \renewcommand{\elemR}[2]{{#1}^{\phantom{\T}}_{\getitemR{#2}}} \renewcommand{\elemRP}[2]{{\big(#1\big)}^{\phantom{\T}}_{\getitemR{#2}}} \renewcommand{\elemRPE}[2]{\big({#1}^{\phantom{\T}}_{\getitemR{#2}}\big)} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \renewcommand{\Vect}[2][{}]{{\boldsymbol{#2}}_{#1}} \renewcommand{\eleVR}[2] {\elemR {\Vect{#1}}{#2}} % con subindices \renewcommand{\eleVRP}[2] {\elemRP {\Vect{#1}}{#2}} % con subindices y paréntesis interior \renewcommand{\eleVRPE}[2]{\elemRPE{\Vect{#1}}{#2}} % con subindices y paréntesis exterior %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \renewcommand{\VectC}[2][{}] {\elemR {\Mat{#2}}{#1}} % con subindices \renewcommand{\VectCP}[2][{}] {\elemRP {\Mat{#2}}{#1}} % con subindices y paréntesis \renewcommand{\VectCPE}[2][{}]{\elemRPE{\Mat{#2}}{#1}} % con subindices y paréntesis exterior %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \renewcommand{\mat}[1]{\mathbf{#1}} \renewcommand{\Mat} [2][{}]{{\mat{#2}}_{#1}} \renewcommand{\T}{\intercal} \renewcommand{\MatT}[2][{}]{{\mat{#2}}^{\T}_{#1}} \renewcommand{\VectC}[2][{}] {\elemR {\Mat{#2}}{#1}} % con subindices \renewcommand{\VectCP}[2][{}] {\elemRP {\Mat{#2}}{#1}} % con subindices y paréntesis \renewcommand{\VectCPE}[2][{}] {\elemRPE {\Mat{#2}}{#1}} % con subindices y paréntesis exterior \renewcommand{\VectCC}[2][{}] {\elemRR {\Mat{#2}}{#1}} % con () \renewcommand{\VectCCC}[2][{}] {\elemRRR{\Mat{#2}}{#1}} % con texto "col" %SELECCIÓNA de FILAS y COlUMNAS DE UNA MATRIZ TRANSPUESTA PARA GENERAR UN VECTOR DE Rn \renewcommand{\VectTC}[2][{}] {\elemR{\MatT{#2}\!}{#1}} % con subindices \renewcommand{\VectTCC}[2][{}] {\elemRR{ \MatT{#2}}{#1}} % con () \renewcommand{\VectTCCC}[2][{}] {\elemRRR{\MatT{#2}}{#1}} % con texto "col" $
${\huge\text{Jupyter notebook de la Lección 17}}$
Índice de contenidos de este notebook (Requiere ejecutar todo el Notebook para que aparezca el índice)
Considere la siguiente matriz cuadrada
A=Matrix([[0,1],[1,0]])
A
$\left[ \begin{array}{cc}0&1\\1&0\\ \end{array} \right]$
x=Vector( [1, 1] )
x
$\begin{pmatrix}1\\1\end{pmatrix}$
A*x
$\begin{pmatrix}1\\1\end{pmatrix}$
y=Vector( [-5, 5 ] ) #(lambda = -1)
y
$\begin{pmatrix}-5\\5\end{pmatrix}$
A*y
$\begin{pmatrix}5\\-5\end{pmatrix}$
A=Matrix([[3,1],[1,3]])
A
$\left[ \begin{array}{cc}3&1\\1&3\\ \end{array} \right]$
x=Vector( [1, 1] ) # lambda=4
x
$\begin{pmatrix}1\\1\end{pmatrix}$
A*x
$\begin{pmatrix}4\\4\end{pmatrix}$
y=Vector( [-1, 1] ) # lambda=2
y
$\begin{pmatrix}-1\\1\end{pmatrix}$
A*y
$\begin{pmatrix}-2\\2\end{pmatrix}$
Q = Matrix( [ [0, -1], [1, 0] ] )
Q
$\left[ \begin{array}{cc}0&-1\\1&0\\ \end{array} \right]$
x = Vector( [1, 2])
x
$\begin{pmatrix}1\\2\end{pmatrix}$
z=Q*x
z
$\begin{pmatrix}-2\\1\end{pmatrix}$
Q*Q*Q*Q*x
$\begin{pmatrix}1\\2\end{pmatrix}$
S = Sistema([ (Q**n)*x for n in range(0,13) ])
S
$\left[\begin{pmatrix}1\\2\end{pmatrix};\;\begin{pmatrix}-2\\1\end{pmatrix};\;\begin{pmatrix}-1\\-2\end{pmatrix};\;\begin{pmatrix}2\\-1\end{pmatrix};\;\begin{pmatrix}1\\2\end{pmatrix};\;\begin{pmatrix}-2\\1\end{pmatrix};\;\begin{pmatrix}-1\\-2\end{pmatrix};\;\begin{pmatrix}2\\-1\end{pmatrix};\;\begin{pmatrix}1\\2\end{pmatrix};\;\begin{pmatrix}-2\\1\end{pmatrix};\;\begin{pmatrix}-1\\-2\end{pmatrix};\;\begin{pmatrix}2\\-1\end{pmatrix};\;\begin{pmatrix}1\\2\end{pmatrix};\right]$
[ (S|i) * (S|(i+1)) for i in range(1,13) ]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
A = Matrix( [[3, 1], [0, 3]] )
A
$\left[ \begin{array}{cc}3&1\\0&3\\ \end{array} \right]$
Homogenea(A-3*I(2),1)
$\mathcal{L}\left(\ \left[\begin{pmatrix}1\\0\end{pmatrix};\right]\ \right)$
x = Vector( [1, 0] )
x
$\begin{pmatrix}1\\0\end{pmatrix}$
A*x
$\begin{pmatrix}3\\0\end{pmatrix}$
Ejercicio 1
A=Matrix([[-3,4,-4], [-3,5,-3], [-1,2,0]])
A
$\left[ \begin{array}{ccc}-3&4&-4\\-3&5&-3\\-1&2&0\\ \end{array} \right]$
m = Vector([0,1,1]);m
$\begin{pmatrix}0\\1\\1\end{pmatrix}$
A*m
$\begin{pmatrix}0\\2\\2\end{pmatrix}$
v= Vector([2,1,0]); v
$\begin{pmatrix}2\\1\\0\end{pmatrix}$
A*v
$\begin{pmatrix}-2\\-1\\0\end{pmatrix}$
-1*v
$\begin{pmatrix}-2\\-1\\0\end{pmatrix}$
w=Vector([1,0,-1]);w
$\begin{pmatrix}1\\0\\-1\end{pmatrix}$
A*w
$\begin{pmatrix}1\\0\\-1\end{pmatrix}$
1*w
$\begin{pmatrix}1\\0\\-1\end{pmatrix}$
A-2*I(3)
$\left[ \begin{array}{ccc}-5&4&-4\\-3&3&-3\\-1&2&-2\\ \end{array} \right]$
Homogenea(A-2*I(3),1)
$\mathcal{L}\left(\ \left[\begin{pmatrix}0\\5\\5\end{pmatrix};\right]\ \right)$
---- FIN DE LA LECCIÓN -----
Lo que sigue es sólo para crear un índice de contenidos de este notebook (y se muestra al principio de la página)
%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')