%!TEX root = 162AB Lecture Notes v2.tex
\chapter{Preliminaries}\label{chp0}
\begin{introduction}
\item Vector space
\item Inner product on vector space
\item Linear transformation
\item Lines, planes, and spheres
\item Einstein Convention
\item Vector Calculus
\end{introduction}
\section{Vector Spaces}



\begin{definition}{Vector Space}{}
A vector space $V$  is a  \red{ nonempty } {set with  two binary operations ``$+$''  and scalar multiplication ``$\cdot$'' satisfying the following eight axioms:} let $\uu,\vv,\ww\in V$ and $r,s\in\R$, we have
\begin{itemize}
\item $\uu+\vv=\vv+\uu$;
\item$\uu+(\vv+\ww)=(\uu+\vv)+\ww$;
\item${\bf 0}+\uu=\uu+{\bf 0}=\uu\,\,$ for a vector called ${\bf 0}$;
\item$(rs)\cdot \uu=r\cdot(s\cdot \uu)$;
\item$(r+s)\cdot \uu=r\cdot \uu+s\cdot \uu$;
\item 
$r\cdot(\uu+\vv)=r\cdot \uu+r\cdot \vv$;
\item $0\cdot \uu={\bf 0}$;
\item $1\cdot \uu=\uu$.

\end{itemize}
\end{definition}

As is well-known, the set $V$ satisfying the first three axioms form an \emph{\red{Abel semi-group}}.

The existence of the inverse of  a vector $\uu$ can be verified by using the scalar multiplication. 

Let $\uu$ be a vector, we claim that  $(-1)\cdot \uu$ is the inverse of $\uu$ because
\[
\uu+(-1)\cdot \uu=(1+(-1))\cdot \uu={\bf 0}.
\]

Similarly, we can define the subtraction by
\[
\uu-\vv=\uu+(-1)\cdot\vv.
\]

\begin{note}We sometimes omit the $\cdot$ and write, for example, $r\uu$ for $r\cdot \uu$.\end{note}

\begin{elink}
\href{https://www.math.uci.edu/~prerequisite-videos/MATH\%203D\%20Content/5\%20Linear\%20Independence/Linear\%20Independence\%20video.mp4}{Here is the video explanation of vector space (linear indepedence).}
\end{elink}

\marginpar{\red{\it Useful!}}

\begin{elink}
\href{https://www.math.uci.edu/~prerequisite-videos/162a.html}{Here is the Math 162A pre-requisite videos.}
\end{elink}

\vspace{.2in}

In linear algebra, we restrict ourselves to finite dimensional vector space. But, a lot of results in finite  dimensional case can be extended to infinite 
dimensional case as well as \emph{\red{abstract}} vector space cases.

In the following, we give some examples of vector spaces.

\begin{example}
$\R^n$, the $n$-dimensional \emph{\red{Euclidean space}}, is the set of all $n$-vectors
\[
\R^n=\left\{\quad{\bf x}=\begin{bmatrix}x_1\\\vdots\\x_n\end{bmatrix}\mid x_i\in\R\right\}.
\]
\end{example}

\begin{example}
The set of all $m\times n$ matrices for an $(mn)$-dimensional vector space. 
\end{example}



\begin{example}
The space of polynomials of degree no more than $n$, where $n$ is a nonnegative integer, is a vector space. 
\end{example}

A single-variable polynomial of degree no more than $n$ can be expressed as
\[
p(t)=a_0+a_1 t+\cdots+ a_n t^n.
\]
Let 
\[
q(t)=b_0+b_1 t+\cdots+ b_n t^n
\]
be another polynomial. Define the addition to be
\[
(p+q)(t)=(a_0+b_0)+(a_1+b_1) t+\cdots+ (a_n+b_n) t^n,
\]
and the scalar multipliction to be: let $\lambda\in\R$
\[
(\lambda p)(t)=(\lambda a_0)+(\lambda a_1) t+\cdots+ (\lambda  a_n) t^n.
\]
With respect to the addition and scalar multiplication, the space is a vector space. 

In the above two examples, the dimensions of the vector spaces are \emph{finite}. Let's show some  examples of infinite dimensional vector spaces.



\begin{note}{The set of all polynomials of degree equal to $n$ is \red{not } a  vector space.} \end{note}

\begin{example} Moreover, the space of all real-valued functions on a set is a (infinite dimensional) vector space. \end{example}


Let's recall  the definition of a function. 
\begin{definition}{}{}
A function $f: X\to Y$ is a triple $(f,X,Y)$, where $X,Y$ are sets, and $f$ is an assignment, or a rule, that for any element $x$ in $X$, there is a unique $y=f(x)$ in $Y$ attached to it. 

$X$ is called the \red{{domain}} \index{function!domain} of $f$, and $Y$ is called the \red{{codomain}} \index{function!codomain} of $f$. The \red{{range}} \index{function!range} is the subset of the codomain $Y$ consists of all $f(x)$ when $X$ is running through $X$. The assignment sometimes is written as $x\mapsto f(x)$. Thus a complete description of a function can be given as
\[
f: X\to Y,\quad x\mapsto f(x).
\]



\begin{center}
\vspace{.1in}
\begin{tikzpicture}
  
    \filldraw[fill=blue!20, draw=blue!60] (-1.5,0) circle (1cm);
    \filldraw[fill=red!20, draw=red!60] (1.5,0) circle (1cm);
    \filldraw[fill=green!20, draw=green!60] (1,0) circle (0.5cm);


    \node (x1)at (-1,0.5) {\hspace{-.3cm}$u$};
    \node (x2) at (-1.3,-0.5) {\hspace{-.3cm}$v$};
    \node (y1) at (1.2,0.) {};
    \node (y2) at (1.,-0.3) {};

    % position the elements in the sets (at the nodes we just created)
    \fill[blue] (x1) circle (1pt);
    \fill[blue] (x2) circle (1pt);
    \fill[red] (y1) circle (1pt);
    \fill[red] (y2) circle (1pt);

    % draw the arrows
    \draw[->] (x1) -- (y1);
    \draw[->] (x2) -- (y2);
\end{tikzpicture}
\end{center}



\end{definition}


As above, we can define the addition and scalar multiplication as 
\[
(f+g)(x)=f(x)+g(x),\qquad (\lambda f)(x)=\lambda f(x).
\]

\begin{remark}
The vector space we study in differential geometry are the ``abstract'' vector space, which is on the  contrary to the vector spaces we studied in Math 3A.
\end{remark}

The following concepts are defined  in abstract vector spaces similar to those in $\R^n$. 

\begin{enumerate}
\item linear combination, span;
\item linear dependence and independence;
\item basis and dimension.
\end{enumerate}

\begin{remark}
In infinite dimensional space, a  basis is defined by a set of vectors 
\[
\mathfrak I=\{\vv_1,\vv_2,\cdots, \vv_n,\cdots\}
\]
 satisfying the following
\begin{enumerate}
\item any finite subset of $\mathfrak I$ is linearly independent;
\item any element can be expressed as a (finite) linear combination of element in $\mathfrak I$. 
\end{enumerate}
\end{remark}




Let $(V,+,\cdot)$ be a vector space. We can endow geometric structure onto it by defining the concept of inner product. 

\begin{remark}
Let 
\[
\mathfrak S=\{\vv_1,\vv_2,\cdots, \vv_n\}
\]
be a finite set. Let 
\[
V={\rm Span}\,\mathfrak S={\rm Span}\,\{\vv_1,\vv_2,\cdots, \vv_n\}.
\]
Then we say $\mathfrak S$ spans $V$, and $\mathfrak S$ is a \emph{\red{spanning}} set of $V$.
\end{remark}

\section{Inner Product}
The addition and scalar multiplication define the \emph{\red{algebraic structure}} of a vector space. In order to introduce geometry to linear algebra, 
we  can endow geometric structure onto it by defining the concept  called \emph{\red{inner product}}. 

\begin{definition}{}{}
An inner product on a vector space $V$ is a function $\langle\,\,,\,\,\rangle$
\[
V\times V\to \R
\]
satisfying 
the following properties: let $\uu,\vv,\ww\in V$ and $r,s\in\R$, we have
\[
\begin{matrix*}[l]
(a).\,\langle \uu,\vv\rangle=\langle \vv,\uu\rangle &&&& \red{Symmetry}\\
(b). \,\langle \uu,r\vv+s\ww\rangle=r  \langle \uu,\vv\rangle+ s\langle \uu,\ww\rangle &&&& \red{Linearity}\\
(c). \langle \uu,\uu\rangle \geq 0 \text { and equality is true if and only if } \uu={\bf 0} &&&& \red{Positivity}
\end{matrix*}
\]
\end{definition}

Once we introduce the inner product, we introduce geometry into vector space. For example

\begin{definition}{}{}
(Length of a vector) We can define the length, or the \red{norm},  of a vector to be
\[
\|\uu\|=\sqrt{\langle \uu,\uu\rangle}.
\]

(Distance) Let $\uu,\vv$ be two vectors. Then their distance is defined to be
\[
{\rm dist}(\uu,\vv)=\|\uu-\vv\|=\sqrt{\langle \uu-\vv,\uu-\vv\rangle}.
\]
\end{definition}

Note in the definition of distance, we used both the geometric structure (inner product) and algebraic structrue (subtraction is defined by $\uu-\vv=\uu+(-1)\cdot \vv$).




\begin{example}
In $\R^3$ (and in $\R^n$), the ordinary \emph{\red{dot product}}
\[
\langle (a^1,a^2,a^3), (b^1,b^2,b^3)\rangle =a^1b^1+a^2b^2+a^3b^3
\]
is an inner product.

\end{example}

However, there are many other ways one can define inner product on $\R^3$. For example, we can define
\[
\langle (a^1,a^2,a^3), (b^1,b^2,b^3)\rangle=2a^1b^1+3a^2b^2+4a^3b^3.
\]
It is an inner product. In general, let
\[
R=\begin{bmatrix}
r_{11} &r_{12}& r_{13}\\
r_{21} &r_{22}& r_{23}\\
r_{31} &r_{32}& r_{33}
\end{bmatrix}
\]
be a positive definite matrix. Then 
\[
\langle (a^1,a^2,a^3), (b^1,b^2,b^3)\rangle=\sum_{i,j=1}^3 r_{ij} a^i b^j
\]
is an inner product. 

\begin{example}
We let $R[t]$ be the vector space of all polynomials. Define the inner product 
\[
\langle p,q\rangle =\int^1_{-1} p(x)q(x) \,dx 
\]
More general, if $\rho(x)>0$ be a positive continuous  function, then  
\[
\langle p,q\rangle =\int^1_{-1} p(x)q(x)\rho(x)\, dx
\]
is an inner product. 
\end{example}



One of the most important inequality in mathematics is called the \emph{\red{Cauchy-Schwarz Inequality}}. 

\begin{theorem}{}{} Let $\uu,\vv$ be two vectors. Then we have
\[
|\langle \uu,\vv\rangle|\leq \|\uu\|\cdot\|\vv\|,
\]
and the equality holds if and only if $\uu,\vv$ are linearly dependent. 
\end{theorem}


\begin{proof} This is the standard proof. 
Let $t$ be a real number. Then by the positivity of the inner product, we have
\[
\langle \uu+t\vv, \uu+t\vv\rangle\geq 0.
\]
Using the linearity, we get
\[
t^2\langle \vv,\vv\rangle +2 t\langle \uu,\vv\rangle+\langle \uu,\uu\rangle\geq 0.
\]
Since the above inequality is true for any real number $t$, the discriminant 
\[
\Delta=4|\langle \uu,\vv\rangle|^2-4 \langle \uu,\uu\rangle\cdot \langle \vv,\vv\rangle\leq 0,
\]
which proves the inequality. 
\end{proof}

\begin{proof}[Second Proof] Assume that $\vv\neq {\bf 0}$. Then 
we have
\[
\langle\uu-\frac{\langle \uu,\vv\rangle}{\langle\vv,\vv\rangle } \vv,\uu-\frac{\langle \uu,\vv\rangle}{\langle\vv,\vv\rangle } \vv\rangle\geq 0.
\]
Expanding the above inequality, we obtain the Cauchy-Schwarz Inequality.
\end{proof}

\begin{remark} The Cauchy-Schwarz inequality is also called the
Cauchy-Bunyakovsky-Schwarz inequality.

The inequality for sums was published by Augustin-Louis Cauchy (1821), while the corresponding inequality for integrals was first proved by Viktor Bunyakovsky (1859). The modern proof of the integral version was given by Hermann Schwarz (1888).
\end{remark}
\begin{definition}{}{}
Two vectors $\uu,\vv$ are called \red{orthogonal}, if $\langle \uu,\vv\rangle=0$.
\end{definition}


\begin{example}
In $\R^3$, the vector $(1,2,3)$ is orthogonal to $(4,-5,2)$ with respect to the dot product,  because 
\[
(1,2,3)\cdot (4,-5,2)=1\cdot 4+2\cdot (-5)+3\cdot 2=0.
\]
\end{example}

\begin{example}
Under the inner product
\[
\langle p,q\rangle=\int^1_{-1} p(x)q(x)\, dx.
\]
The function $x$ and $x^2+1$ are orthogonal because $p(x)$ is an odd function. 
\end{example}

An \emph{\red{orthonormal basis}} of an $n$-dimensional vector space is a set $\{ \vv_1,\cdots,\vv_n\}$ such that 
\[
\langle  \vv_i,\vv_j\rangle =
\left\{
\begin{array}{ll}
1, & \text{if} \quad i=j\\
0, & \text{if}\quad  i\neq j
\end{array}
\right..
\]
We shall introduce the \emph{\red{Kronecker symbol}} $\delta_{ij}$ as follows
\[
\delta_{ij}=\left\{\begin{array}{ll}
1, & \text{if} \quad i=j\\
0, & \text{if}\quad  i\neq j
\end{array}
\right..
\]
Under this notation, we have
\[
\langle \vv_i, \vv_j\rangle=\delta_{ij}.
\]



\section{Linear Transformation}
\begin{definition}{}{}
Given two vector spaces, $V$ and $W$, a linear transformation $T$ from $V$ to $W$ is a mapping
\[
T: V\to W
\]
such that 
\[
T(\alpha \uu+\beta \vv)=\alpha T(\uu)+\beta T(\vv)
\]
for all $\uu,\vv\in V$ and $\alpha,\beta\in\R$.
\end{definition}
A linear transformation of a vector space to itself is called an \emph{\red{endomorphism}}. One of the most important concept of an endomorphism is its eigenvalue and eigenvector. 

\begin{definition}{}{}
Let $T: V\to V$ be an endomorphism. Assume that there is a $\vv\in V$ and $\vv\neq 0$ such that

\[T(\vv)=\lambda \vv\]

for some \red{ complex number $\lambda$. }  Then $\lambda$ is called an  \red{  eigenvalue } of $T$ and $v$ is an  \red{ eigenvector of } $\lambda$. 
\end{definition}
\begin{note}In the following, we need to prove that the definition of eigenvalue is equivalent  to the definition of an eigenvalue of a  matrix.\end{note}

Let $V$ be a finite dimensional space and let
\[
\mathfrak B=\{ \vv_1,\cdots, \vv_n\}
\]
be a basis of $V$. We use the notation $[\xx]_{\mathfrak B}$ to represent  the coordinates of $\xx\in V$, that is, when we write $x$ in terms of the linear combination of the basis,
\[
\xx=c_1\vv_1+\cdots+c_n \vv_n,
\]
we have
\[
[\xx]_{\mathfrak B}=\begin{bmatrix} c_1\\\vdots\\c_n
\end{bmatrix}.
\]


Now let $T: V\to W$ be a linear transformation. 
As above, we assume that $\mathfrak B$ is the basis of $V$, and let $\mathfrak C=\{\ww_1,\cdots, \ww_m\}$ be a basis of $W$. Then the matrix representation $M$ of $T$ is
\[
M=\left[[T(\vv_1)]_{\mathfrak C},\cdots, [T(\vv_n)]_{\mathfrak C}\right]
\]
in the sense that 
\[
\left[T(\xx)\right]_{\mathfrak C}=M\cdot [\xx]_{\mathfrak B}.
\]


Now we specialize the above result to the following case. Let 
\[
T: V\to V
\]
be a linear  transformation from $V$ to itself. Let
\[
\mathfrak B=\{\vv_1,\cdots, \vv_n\},\qquad \mathfrak C=\{\ww_1,\cdots, \ww_n\}
\]
be two bases. Let $M_1$, $M_2$ be the matrix representatives with respect to the two bases respectively. We thus have
\begin{align*}
& \left[T(\xx)\right]_{\mathfrak B}=M_1\cdot [\xx]_{\mathfrak B};\\
& \left[T(\xx)\right]_{\mathfrak C}=M_2\cdot [\xx]_{\mathfrak C}.
\end{align*}
Let $A$ be the invertible matrix such that 
\[
[\xx]_{\mathfrak B}=A\cdot [\xx]_{\mathfrak C}.
\]
Such a matrix is called a \emph{\red{transition matrix}}.
Then 
\[
\left[T(\xx)\right]_{\mathfrak B}=A\cdot \left[T(\xx)\right]_{\mathfrak C}.
\]

As a result,
\[
A\cdot M_2 \cdot [\xx]_{\mathfrak C}=A \cdot \left[T(\xx)\right]_{\mathfrak C}=\left[T(\xx)\right]_{\mathfrak B}=M_1\cdot A \cdot [\xx]_{\mathfrak C}.
\]
Thus we have 
\[
AM_2=M_1A,
\]
or
\[
M_2=A^{-1}M_1A.
\]
Thus $M_1, M_2$ are similar, having the same eigenvalue set. 

Now we talk about \emph{\red{orientation and cross product}}.

Let $\mathfrak B$ and $\mathfrak C$ be two bases. We say that $\mathfrak B$ and $\mathfrak C$ are having the same orientation, if when we write
\[
\vv_i=\sum_{j=1}^n a_{ij} \ww_j
\]
for $i=1,\cdots, n$, then we have $\det(A)=\det (a_{ij})>0$. They give the opposite orientation  if $\det (a_{ij})<0$.


\begin{example}
The left hand and the right hand define two opposite orientations of $\R^3$.
\end{example}



\begin{example}
Let 
\[
\mathfrak B=\{(1,0,0), (0,1,0), (0,0,1)\}
\]
and 
\[
\mathfrak C=\{(1,1,0), (1,0,-1), (2,1,3)\}
\]
are of the opposite orientation. 
\end{example}



\begin{definition}{}{} Let $\{{\bf e}_1,{\bf e}_2,{\bf e}_3\}$ be the standard basis of $\R^3$. 
If
\[
\uu=\sum_{i=1}^3 a_i {\bf e}_i,\qquad \vv=\sum_{j=1}^3 b_j {\bf e}_j
\]
are two vectors in $\R^3$, the cross product of $\uu,\vv$ is given by
\[
\uu\times \vv=(a_2b_3-a_3b_2) {\bf e}_1+(a_3b_1-a_1b_3) {\bf e}_2+(a_1b_2-a_2b_1) {\bf e}_3,
\]
or we can write
\[
\uu\times \vv=\det \begin{bmatrix} {\bf e}_1&{\bf e}_2& {\bf e}_3\\a_1& a_2& a_3\\b_1& b_2&b_3\end{bmatrix}.
\]
\end{definition}


The cross product satisfies the following properties:

\begin{lemma}{}{} Let ${\bf u},{\bf v},{\bf w}\in\R^3$ and $r\in\R$. Then
\begin{itemize}
\item ${\bf u}\times {\bf v}=-{\bf v}\times {\bf u}$
\item $(r{\bf u})\times \vv=r(\uu\times \vv)$
\item $\uu\times \vv=0$ if and only if $\uu$ and $\vv$ are linearly dependent
\item $(\uu+\vv)\times \ww=\uu\times\ww+\vv\times\ww$
\item $\uu\times \vv$ is perpendicular to both $\uu$ and $\vv$ under the usual dot product
\item $\|\uu\times\vv\|=\|\uu\|\cdot\|\vv\|\sin\theta$, where $\theta$ is the angle between $\uu$ and $\vv$. 
\item $\{\uu,\vv,\uu\times\vv\}$ gives a right hand orientation to $\R^3$ if $\{\uu,\vv\}$ is linearly independent
\end{itemize}
\end{lemma}


As a result, we have the relationship between the inner product and outer product (cross product)
\[
|\langle \uu,\vv\rangle|^2+\|\uu\times\vv\|^2=\|\uu\|^2\cdot\|\vv\|^2,
\]
which implies the Cauchy-Schwarz Inequality in the three dimensional space.

\begin{definition}{}{}
The \red{mixed } (or \red{triple})  product of $\uu,\vv,\ww$ is
\[
[\uu,\vv,\ww]=\langle\uu\times\vv,\ww\rangle.
\]
\end{definition}

A geometric interpretation of the norm of the cross product is that it is the area  of the parallelogram spanned by $\uu,\vv$.
A geometric interpretation of the mixed scalar product is that it is the volume of the parallelepiped spanned by $\uu,\vv,\ww$. 


\section{Lines, planes, and spheres}
In this section, we use vector notations to express some basic objects in analytic geometry.

\begin{definition}{}{}
The line through $\xx_0\in\R^3$ and parallel to a vector $\vv\neq 0$ has the equation
\[
\alpha(t)=\xx_0+t\vv.
\]
\end{definition}

\begin{remark}
This is a vector notation of parametrization of a line. 
\end{remark}


\begin{example}{}{}
Let $\xx_1,\xx_2\in\R^3$ be two points. Then the line through $\xx_1$
and $\xx_2$ in $\R^3$ has the equation.
\[
\alpha(t)=\xx_1+t(\xx_2-\xx_1).
\]
\end{example}



\begin{definition}{}{}
The plane  through $\xx_0$ perpendicular to ${\bf n}\neq 0$ has the equation
\[
\langle \xx-\xx_0,{\bf n}\rangle=0.
\]
\end{definition}





\begin{lemma}{}{}
Let $\{\uu,\vv\}$ be two linearly independent vectors. Then the place through
$\xx_0$ and parallel to the subspace spanned by $\{\uu,\vv\}$ has the equation
\[
[\uu,\vv,\xx-\xx_0]=\langle \xx-\xx_0, \uu\times\vv\rangle=0.
\]
\end{lemma}


\begin{definition}{}{}
The sphere in $\R^3$ with center ${\bf m}$ and radius $r>0$ has equation
\begin{equation}\label{1}
\langle \xx-{\bf m}, \xx-{\bf m}\rangle=\|\xx-{\bf m}\|^2=r^2.
\end{equation}

\end{definition}

\begin{remark}
Let
\[
\xx=\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix},\qquad
\bf m=\begin{bmatrix}m_1\\m_2\\m_3\end{bmatrix}.
\]
Then we get the usual equation of a sphere
\[
(x_1-m_1)^2+(x_2-m_2)^2+(x_3-m_3)^2=r^2.
\]
\end{remark}


\begin{example}{\color{orange}{(Kelvin Transformation)}}

We consider the equation of a sphere ~\eqref{1}. Let $\xx_0$ be a point on the sphere, that is, we have
\[
\langle \xx_0-{\bf m}, \xx_0-{\bf m}\rangle=r^2.
\]
The Kelvin Transformation is a map
\[
K: \R^3\to\R^3,\qquad {\bf x}\mapsto \xx_0+\frac{{\bf x}-\xx_0}{\|{\bf x}-\xx_o\|^2}
\]
By a straightforward computation, we have $K^2=id$. Assume 
\[
\langle K(x)-{\bf m}, K(x)-{\bf m}\rangle=r^2.
\]
We get
\[
1+2\langle \xx-\xx_0, \xx_0-{\bf m}\rangle=0.
\]
So the Kelvin transformation maps a sphere to a plane. 
\end{example}

\begin{elink} The detailed computation can be found \href{https://youtu.be/FFKzFcH3tho}{here}. 

\end{elink}

\begin{example} {\color{orange}{(Ptolemy Inequality)}}
Let $\uu,\vv,\ww,\xx$ be four vectors in the Euclidean plane. Then we have
\[
\|\uu-\ww\|\cdot\|\vv-\xx\|\leq
\|\uu-\vv\|\cdot \|\xx-\ww\|+\|\uu-\xx\|\cdot \|\vv-\ww\|.
\]
The equality is valid if and only if these four vectors are concyclic.
\end{example}

\begin{elink}
The Ptolemy Inequality is closely related to the Ptolemy Theorem. For details of the Ptolemy and his theorem, see
\href{https://en.wikipedia.org/wiki/Ptolemy\%27s_theorem}{Wikepedia of Ptolemy Theorem}
\end{elink}


\section{Vector Calculus}
In differential geometry, in addition to study functions of several variables. We also need to study vector-valued functions.

We can define  derivatives, indefinite integral and definite integrable in  similar ways to those of multi-variable functions. 

Let $V,W$ be finite dimensional vector spaces. Let
\[
F: V\to W
\]
be a \emph{\red{differentiable}} function, with definition as follows.

\begin{definition}{}{}
We fix a basis of $V$ and using that basis, we identify $V$ to $\R^n$. Similarly,  and we fix a basis of  $W$ and identify it   to $\R^m$. Then we can identify $F:V\to W$ by $F: \R^n\to\R^m$. So $F$ is differentiable if and only if  $F$ is a differentiable as a mapping of $\R^n\to \R^m$. 
\end{definition}

\begin{elink}
\href{https://youtu.be/FSgHR2DB2AA}{Here is a video clip for the details of the above definition.}
\end{elink}

\vspace{.1in}

Let $f:\R\to \R^n$ be a single variable vector-valued function. We can define
\[
\frac{df}{dt}
=\begin{bmatrix}{\displaystyle \frac{df_1}{dt}}\\[5pt]\vdots \\[5pt]{\displaystyle  \frac{df_n}{dt}}\end{bmatrix}
\]
if
\[
f=\begin{bmatrix} f_1\\\vdots\\f_n\end{bmatrix}
\]

Likewise, we can define 
\[
\int f(t) \,dt, \qquad \int_a^b f(t)\, dt
\]
in  similar ways. 

If $f:\R\to V$ be an abstract vector-valued function, we can identity $V$ with $\R^n$ under a fixed basis, and define the derivative, integral, etc, similarly. 


\begin{lemma}{}{}
Let $f: \R\to V, g: \R\to V$ and let $\langle\,\,,\,\,\rangle$
be an inner product on $V$. Then if $f$ and $g$ are differentiable, so is
$\langle f,g\rangle$, which is a function of one variable. Moreover, we have
\[
\frac{d}{dt}\langle f,g\rangle=\langle \frac{df}{dt},g\rangle+\langle f,\frac{dg}{dt}\rangle.
\]
\end{lemma}
Similarly, we have
\begin{lemma}{}{} Using the notations as in the above lemma, we have
\[
\frac{d}{dt}(f\times g)=\frac{df}{dt}\times g+f\times \frac{dg}{dt}.
\]
\end{lemma}


Both of the above two lemmas can be proved directly. Moreover, we can generalize the above results into the following.

Let $V,W,S$ be  vector spaces (probably of infinite dimensional)  and let
\[
K: V\times W\to S
\]
be a map. We say $K$ is \emph{\red{bilinear}}, if $K$ is linear with respect to each component. 

Both the inner product and cross product are bilinear mappings. 

Let $f:\R\to V$, $g:\R\to W$ be differentiable functions. Then the function
\[
h(t)=K(f(t), g(t))
\]
is differentiable, and
\[
\frac{dh}{dt}=K(\frac{df}{dt}, g(t))+K(f(t),\frac{dg}{dt}).
\]

\begin{definition}{}{}
Let $f:\R\to\R$  be a continuous function. We say $f$ is of class $\red{\mathcal C^k}$, if all derivatives up through order $k$ exist and are continuous. 

$f: \R^n\to\R$ is of class $\red{\mathcal C^k}$ if all its (mixed) partial 
derivatives of up through  order $k$  exist and are continuous. A vector-valued function is of class $\red{\mathcal C^k}$ if all of its components with respect to a given basis are of class $\red{\mathcal C^k}$. 

If $f$ is of class $\red{\mathcal C^k}$ for any $k$, we say $f$ is of $\red{\mathcal C^\infty}$, or we say $f$ is {\red{smooth}}. 
\end{definition}

We assume  most of the functions we shall study in this course are smooth,  or at least of $\mathcal C^3$.

Finally, we review the chain rule. Let $x$ be a  function of $(u_1,\cdots, u_n)$, and if each $u_i$ are functions of $(v_1,\cdots, v_m)$, say,
\[
u_i=u_i(v_1,\cdots, v_m).
\]
for $i=1,\cdots,n$. 
Then we have the chain rule
\begin{equation}\label{2}
\frac{\pa x}{\pa v_\alpha}=\sum_{i=1}^n\frac{\pa x}{\pa u_i}\cdot \frac{\pa u_i}{\pa v_\alpha}
\end{equation}
for $\alpha=1,\cdots, m$.

\section{Einstein Convention}
\begin{definition}{Einstein Convention}{}
When an index variable appears twice in a single term and is not otherwise defined, it implies summation of that term over all the values of the index. When an index variable appears only once, it implies that the equation is valid for every value of such an index. 
\end{definition}
 For example, Equation ~\eqref{2} can be written as 
\[
\frac{\pa x}{\pa v_\alpha}=\frac{\pa x}{\pa u_i}\cdot \frac{\pa u_i}{\pa v_\alpha}.
\]
In the above equation, the index $i$ in the right appears twice, so we assume the expression is summing over all possible $i$. On the other hand, the index $\alpha$ appears only once, so we assume the equation is valid for all  range of $\alpha$.
\begin{example}
Let $A=(a_{ij})$, $B=(b_{ij})$, and $C=(c_{ij})$ be matrices. Then the matrix multiplication, 
\[
C=AB,
\]
can be written using the Einstein Convention as
\[
c_{ij}=a_{ik}b_{kj}.
\]
\end{example}

The Einstein Convention gives another  way to express and generalize  linear algebra.

\begin{note}
Let's discuss the representation of a matrix. In linear algebra, there are three ways to represent a matrix
\[
A=[{\bf a}_1,\cdots, {\bf a}_n]=\begin{bmatrix}a_{11}&\cdots&a_{1n}\\
\vdots&&\vdots\\a_{m1}&\cdots&a_{mn}
\end{bmatrix},
\]
where ${\bf a}_1,\cdots, {\bf a}_n$ are column vectors. The easiest way to represent a matrix is to  a capital letter, say $A$.  But  this would contain the least amount of information about the matrix. On the other extreme, if we represent a matrix by providing all the details, it would be too clumsy to write down. 

Here we give the fourth method of representing a matrix, by writing it as $(a_{ij})$, which takes care of both simplicity  and information. 
\end{note}



\begin{example} Prove the associativity of matrix multiplication. 
\end{example}

\begin{proof}
Let $A=(a_{ij})$, $B=(b_{ij})$ be matrices. Let $D=(d_{ij})$ be the matrix $D=AB$. In terms of the Einstein Convention, $D=AB$ is equivalent to 
\begin{equation}\label{6}
d_{ij}=a_{ik}b_{kj}.
\end{equation}
Here the index $k$ is called a \emph{\red{dummy}} index in the sense that we can replace it with other indices without changing the equations:
\begin{equation}\label{7}
d_{ij}=a_{ik}b_{kj}=a_{it}b_{tj}=a_{i\alpha}b_{\alpha j}.
\end{equation}
Now let $C=(c_{ij})$, $E=BC=(e_{ij})$, $F=(AB)C=(f_{ij})$ and $G=A(BC)=(g_{ij})$. Then the entries for $(AB)C=DC$ would be
\[
f_{ij}=d_{ik}c_{kj}=d_{it}c_{tj}.
\]
From ~\eqref{7}, we know that $d_{it}=a_{ik}b_{kt}$. Thus 
\[
f_{ij}=a_{ik}b_{kt}c_{tj}.
\]
The reason we use $t$ as  the dummy index in ~\eqref{7} is because $k$ has been used in~\eqref{6} so we need to use a different one, keeping indices repeated at most twice. 

Similarly, we have
\[
g_{ij}=a_{it}b_{tk}c_{kj}. 
\]
Thus $f_{ij}=g_{ij}$ and hence 
\[
(AB)C=A(BC),
\]
proving the associativity. 
\end{proof}

\begin{example} Using the Einstein Convention to prove the following version of the Cauchy inequality. Let
$\xx=(x_1,\cdots,x_n)$ and ${\bf y}=(y_1,\cdots, y_n)$. Then
\[
|\xx\cdot{\bf y}|^2\leq \|\xx\|^2\cdot\|{\bf y}\|^2.
\]
\end{example}

\begin{proof}
Using the Einstein Convention, we can write
\[
\xx\cdot{\bf y}=\sum_{i=1}^n x_i y_i=x_iy_i.
\]
Thus
\[
|\xx\cdot{\bf y}|^2=\left(\sum_{i=1}^n x_i y_i\right)^2=\left(\sum_{i=1}^n x_i y_i\right)\cdot\left(\sum_{j=1}^n x_j y_j\right)=x_iy_ix_jy_j.
\]

On the other hands, we can write
\[
\|\xx\|^2\cdot\|{\bf y}\|^2=\left(\sum_{i=1}^n x_i^2\right)\cdot \left(\sum_{j=1}^n y_j^2\right)=x_i^2y_j^2.
\]
Thus the Cauchy inequality, written under the Einstein Convention, is
\[
x_i^2y_j^2-x_iy_ix_jy_j=\frac 12(x_i^2y_j^2+x_j^2y_i^2)-x_iy_ix_jy_j=\frac 12 (x_iy_j-x_jy_i)^2\geq 0.
\]
This completes the proof. 








\end{proof}

\begin{note} If $n=3$, then we can define
\[
(\xx,{\bf y})\mapsto (x_2y_3-x_2y_2, x_3y_1-x_1y_3, x_1y_2-x_2y_1)=\xx\times{\bf y}
\]
which is the cross product. If $n\neq 3$, then the vector $(x_iy_j-x_jy_i)$ for $i<j$ is of dimension $n(n-1)/2\neq 3$. This explains why we can only define the cross product in 3 dimensional vector space. A more general algebraic product, called {\red{wedge product}}, will be used in any dimensional vector spaces to catch in the excess of the Cauchy inequality.

\end{note}


\begin{elink}
As fun reading, you can find the
\href{https://en.wikipedia.org/wiki/Shoelace_formula}{Shoelace Formula} in the Wikipedia, which is related to both the cross product and wedge product. 
\end{elink}