matrices/slides.tex
author bhanu
Thu, 11 Nov 2010 02:16:07 +0530
changeset 477 0406115dccd1
parent 394 1a79f9ee7f5c
permissions -rw-r--r--
language check done for `matrices`
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
     1
% Created 2010-11-07 Sun 16:18
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
     2
\documentclass[presentation]{beamer}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
     3
\usepackage[latin1]{inputenc}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
     4
\usepackage[T1]{fontenc}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
     5
\usepackage{fixltx2e}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
     6
\usepackage{graphicx}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
     7
\usepackage{longtable}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
     8
\usepackage{float}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
     9
\usepackage{wrapfig}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    10
\usepackage{soul}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    11
\usepackage{t1enc}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    12
\usepackage{textcomp}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    13
\usepackage{marvosym}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    14
\usepackage{wasysym}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    15
\usepackage{latexsym}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    16
\usepackage{amssymb}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    17
\usepackage{hyperref}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    18
\tolerance=1000
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    19
\usepackage[english]{babel} \usepackage{ae,aecompl}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    20
\usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    21
\usepackage{listings}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    22
\lstset{language=Python, basicstyle=\ttfamily\bfseries,
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    23
commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    24
showstringspaces=false, keywordstyle=\color{blue}\bfseries}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    25
\providecommand{\alert}[1]{\textbf{#1}}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    26
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    27
\title{Matrices}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    28
\author{FOSSEE}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    29
\date{}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    30
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    31
\usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    32
\begin{document}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    33
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    34
\maketitle
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    35
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    36
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    37
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    38
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    39
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    40
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    41
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    42
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    43
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    44
\begin{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    45
\frametitle{Outline}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    46
\label{sec-1}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    47
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    48
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    49
\item Creating Matrices
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    50
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    51
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    52
\item using direct data
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    53
\item converting a list
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    54
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    55
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    56
\item Matrix operations
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    57
\item Inverse of matrix
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    58
\item Determinant of matrix
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    59
\item Eigen values and Eigen vectors of matrices
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    60
\item Norm of matrix
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    61
\item Singular Value Decomposition of matrices
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    62
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    63
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    64
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    65
\frametitle{Creating a matrix}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    66
\label{sec-2}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    67
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    68
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    69
\item Creating a matrix using direct data
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    70
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    71
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    72
\begin{verbatim}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    73
   In []: m1 = array([1, 2, 3, 4])
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    74
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    75
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    76
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    77
\item Creating a matrix using lists
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    78
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    79
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    80
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    81
   In []: l1 = [[1,2,3,4],[5,6,7,8]]
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    82
   In []: m2 = array(l1)
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    83
\end{verbatim}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    84
\end{frame}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    85
\begin{frame}[fragile]
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    86
\frametitle{Exercise 1}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    87
\label{sec-3}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    88
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    89
  Create a (2, 4) matrix \texttt{m3}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    90
\begin{verbatim}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    91
   m3 = [[5,  6,  7,  8],
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    92
         [9, 10, 11, 12]]
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    93
\end{verbatim}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    94
\end{frame}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    95
\begin{frame}[fragile]
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    96
\frametitle{Solution 1}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
    97
\label{sec-4}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    98
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
    99
\begin{itemize}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   100
\item m3 can be created as,
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   101
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   102
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   103
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   104
   In []: m3 = array([[5,6,7,8],[9,10,11,12]])
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   105
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   106
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   107
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   108
\frametitle{Matrix operations}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   109
\label{sec-5}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   110
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   111
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   112
\item Element-wise addition (both matrix should be of order \texttt{mXn})
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   113
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   114
     In []: m3 + m2
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   115
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   116
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   117
\item Element-wise subtraction (both matrix should be of order \texttt{mXn})
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   118
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   119
     In []: m3 - m2
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   120
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   121
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   122
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   123
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   124
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   125
\frametitle{Matrix Multiplication}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   126
\label{sec-6}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   127
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   128
\begin{itemize}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   129
\item Element-wise multiplication using \texttt{m3 * m2}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   130
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   131
     In []: m3 * m2
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   132
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   133
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   134
\item Matrix Multiplication using \texttt{dot(m3, m2)}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   135
\begin{verbatim}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   136
     In []: dot(m3, m2)
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   137
     Out []: ValueError: objects are not aligned
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   138
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   139
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   140
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   141
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   142
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   143
\frametitle{Matrix Multiplication (cont'd)}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   144
\label{sec-7}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   145
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   146
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   147
\item Create two compatible matrices of order \texttt{nXm} and \texttt{mXr}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   148
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   149
     In []: m1.shape
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   150
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   151
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   152
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   153
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   154
\item matrix m1 is of order \texttt{1 X 4}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   155
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   156
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   157
\item Creating another matrix of order \texttt{4 X 2}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   158
\begin{verbatim}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   159
     In []: m4 = array([[1,2],[3,4],[5,6],[7,8]])
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   160
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   161
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   162
\item Matrix multiplication
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   163
\begin{verbatim}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   164
     In []: dot(m1, m4)
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   165
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   166
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   167
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   168
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   169
\begin{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   170
\frametitle{Recall from \texttt{array}}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   171
\label{sec-8}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   172
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   173
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   174
\item The functions
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   175
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   176
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   177
\item \texttt{identity(n)} - 
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   178
      creates an identity matrix of order \texttt{nXn}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   179
\item \texttt{zeros((m,n))} - 
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   180
      creates a matrix of order \texttt{mXn} with 0's
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   181
\item \texttt{zeros\_like(A)} - 
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   182
      creates a matrix with 0's similar to the shape of matrix \texttt{A}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   183
\item \texttt{ones((m,n))}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   184
      creates a matrix of order \texttt{mXn} with 1's
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   185
\item \texttt{ones\_like(A)}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   186
      creates a matrix with 1's similar to the shape of matrix \texttt{A}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   187
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   188
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   189
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   190
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   191
  Can also be used with matrices
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   192
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   193
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   194
\frametitle{More matrix operations}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   195
\label{sec-9}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   196
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   197
  Transpose of a matrix
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   198
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   199
   In []: m4.T
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   200
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   201
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   202
\begin{frame}[fragile]
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   203
\frametitle{Exercise 2 : Frobenius norm \& inverse}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   204
\label{sec-10}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   205
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   206
  Find out the Frobenius norm of inverse of a \texttt{4 X 4} matrix.
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   207
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   208
   
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   209
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   210
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   211
  The matrix is
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   212
\begin{verbatim}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   213
   m5 = arange(1,17).reshape(4,4)
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   214
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   215
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   216
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   217
\item Inverse of A,
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   218
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   219
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   220
\item $A^{-1} = inv(A)$
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   221
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   222
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   223
\item Frobenius norm is defined as,
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   224
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   225
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   226
\item $||A||_F = [\sum_{i,j} abs(a_{i,j})^2]^{1/2}$
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   227
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   228
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   229
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   230
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   231
\begin{frame}[fragile]
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   232
\frametitle{Exercise 3 : Infinity norm}
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   233
\label{sec-11}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   234
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   235
  Find the infinity norm of the matrix \texttt{im5}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   236
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   237
   
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   238
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   239
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   240
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   241
\item Infinity norm is defined as,
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   242
       $max([\sum_{i} abs(a_{i})^2])$
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   243
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   244
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   245
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   246
\frametitle{\texttt{norm()} method}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   247
\label{sec-12}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   248
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   249
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   250
\item Frobenius norm
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   251
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   252
     In []: norm(im5)
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   253
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   254
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   255
\item Infinity norm
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   256
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   257
     In []: norm(im5, ord=inf)
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   258
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   259
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   260
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   261
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   262
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   263
\frametitle{Determinant}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   264
\label{sec-13}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   265
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   266
  Find out the determinant of the matrix m5
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   267
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   268
   
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   269
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   270
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   271
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   272
\item determinant can be found out using
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   273
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   274
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   275
\item \texttt{det(A)} - returns the determinant of matrix \texttt{A}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   276
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   277
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   278
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   279
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   280
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   281
\frametitle{eigen values \& eigen vectors}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   282
\label{sec-14}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   283
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   284
  Find out the eigen values and eigen vectors of the matrix \texttt{m5}.
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   285
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   286
   
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   287
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   288
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   289
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   290
\item eigen values and vectors can be found out using
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   291
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   292
     In []: eig(m5)
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   293
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   294
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   295
    returns a tuple of \emph{eigen values} and \emph{eigen vectors}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   296
\item \emph{eigen values} in tuple
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   297
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   298
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   299
\item \texttt{In []: eig(m5)[0]}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   300
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   301
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   302
\item \emph{eigen vectors} in tuple
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   303
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   304
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   305
\item \texttt{In []: eig(m5)[1]}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   306
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   308
\item Computing \emph{eigen values} using \texttt{eigvals()}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   309
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   310
     In []: eigvals(m5)
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   311
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   312
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   313
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   314
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   315
\begin{frame}[fragile]
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   316
\frametitle{Singular Value Decomposition (\texttt{svd})}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   317
\label{sec-15}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   318
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   319
    $M = U \Sigma V^*$
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   320
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   321
\item U, an \texttt{mXm} unitary matrix over K.
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   322
\item $\Sigma$
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   323
        , an \texttt{mXn} diagonal matrix with non-negative real numbers on diagonal.
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   324
\item $V^*$
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   325
        , an \texttt{nXn} unitary matrix over K, denotes the conjugate transpose of V.
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   326
\item SVD of matrix \texttt{m5} can be found out as,
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   327
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   328
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   329
\begin{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   330
     In []: svd(m5)
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   331
\end{verbatim}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   332
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   333
\begin{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   334
\frametitle{Summary}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   335
\label{sec-16}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   336
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   337
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   338
\item Matrices
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   339
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   340
\begin{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   341
\item creating matrices
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   342
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   343
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   344
\item Matrix operations
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   345
\item Inverse (\texttt{inv()})
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   346
\item Determinant (\texttt{det()})
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   347
\item Norm (\texttt{norm()})
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   348
\item Eigen values \& vectors (\texttt{eig(), eigvals()})
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   349
\item Singular Value Decomposition (\texttt{svd()})
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   350
\end{itemize}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   351
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   352
\begin{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   353
\frametitle{Thank you!}
394
1a79f9ee7f5c made changes to script, matrices, using array() instead of matrix() now.
Anoop Jacob Thomas<anoop@fossee.in>
parents: 307
diff changeset
   354
\label{sec-17}
307
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   355
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   356
  \begin{block}{}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   357
  \begin{center}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   358
  This spoken tutorial has been produced by the
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   359
  \textcolor{blue}{FOSSEE} team, which is funded by the 
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   360
  \end{center}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   361
  \begin{center}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   362
    \textcolor{blue}{National Mission on Education through \\
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   363
      Information \& Communication Technology \\ 
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   364
      MHRD, Govt. of India}.
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   365
  \end{center}  
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   366
  \end{block}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   367
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   368
  
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   369
\end{frame}
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   370
1a73dddb1d05 added slides for matrices.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
diff changeset
   371
\end{document}