--- a/day1/session4.tex Thu Oct 15 22:43:51 2009 +0530
+++ b/day1/session4.tex Thu Oct 15 23:10:03 2009 +0530
@@ -129,7 +129,9 @@
\begin{frame}[fragile]
\frametitle{Matrices: Initializing}
\begin{lstlisting}
- In []: a = matrix([[1,2,3],[4,5,6],[7,8,9]])
+ In []: a = matrix([[1,2,3],
+ [4,5,6],
+ [7,8,9]])
In []: a
Out[]:
@@ -142,6 +144,7 @@
\subsection{Basic Operations}
\begin{frame}[fragile]
\frametitle{Inverse of a Matrix}
+\begin{small}
\begin{lstlisting}
In []: linalg.inv(a)
Out[]:
@@ -149,6 +152,7 @@
[ -6.30442381e+15, 1.26088476e+16, -6.30442381e+15],
[ 3.15221191e+15, -6.30442381e+15, 3.15221191e+15]])
\end{lstlisting}
+\end{small}
\end{frame}
\begin{frame}[fragile]
@@ -164,13 +168,12 @@
\begin{lstlisting}
In []: linalg.norm(a)
Out[]: 16.881943016134134
-
- In []: linalg.norm?
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Eigen Values and Eigen Matrix}
+\begin{small}
\begin{lstlisting}
In []: linalg.eigvals(a)
Out[]: array([ 1.61168440e+01, -1.11684397e+00, -1.22196337e-15])
@@ -182,18 +185,20 @@
[-0.52532209, -0.08675134, -0.81649658],
[-0.8186735 , 0.61232756, 0.40824829]]))
\end{lstlisting}
+\end{small}
\end{frame}
\section{Solving linear equations}
\begin{frame}[fragile]
\frametitle{Solution of equations}
Example problem: Consider the set of equations
+\vspace{-0.1in}
\begin{align*}
3x + 2y - z & = 1 \\
2x - 2y + 4z & = -2 \\
-x + \frac{1}{2}y -z & = 0
\end{align*}
-
+\vspace{-0.08in}
To Solve this,
\begin{lstlisting}
In []: A = array([[3,2,-1],[2,-2,4],[-1, 0.5, -1]])