\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[table]{xcolor}
\usepackage{lmodern}
\usepackage{emerald}
\usepackage{eso-pic}
\usepackage[urlcolor=blue,colorlinks=true]{hyperref}
\usepackage[margin=1cm,bottom=2.5cm]{geometry}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{tikz}
	\usetikzlibrary {decorations.pathmorphing , shapes.geometric , calc}
\usepackage{pas-math}
\usepackage{multicol}
\usepackage{cellspace}
\setlength{\cellspacebottomlimit}{4pt}
\setlength{\cellspacetoplimit}{4pt}
\usepackage{eurosym,numprint,esvect}

% Couleurs

\definecolor{bleuciel}{HTML}{45b5f4}
\definecolor{bleu}{HTML}{0e3e59}
\definecolor{orangesanguine}{HTML}{b43f0b}
\definecolor{vert}{HTML}{287f13}

% styles des titres

%%% Titre de la fiche

\renewcommand{\title}[1]{%
\begin{center}
\begin{tikzpicture}
\node[fill=bleuciel,ellipse,decorate,decoration={random steps,segment length=3pt,amplitude=2pt}, align=center,inner ysep=5mm, inner xsep=0pt,ball color=bleuciel] (titre) {\ECFJD\Huge #1};
\node[below] (auteur) at (titre.south) {\ECFJD Une fiche de cours de Stéphane Pasquet - Mise à jour : \today};
\node[below] at (auteur.south) {(\url{https://courspasquet.fr})\qquad\qquad(\url{https://mathweb.fr})};
\end{tikzpicture}
\end{center}
}

%%% section

\titleformat{\section}[block]
{\ECFJD\fontsize{16}{14}\selectfont\color{bleu}}
{\thesection}
{1em}
{\ECFJD}
\setlength{\parindent}{0pt}

%%% subsection

\titleformat{\subsection}[block]
{\ECFJD\fontsize{12}{12}\selectfont\color{orangesanguine}}
{\thesubsection}
{1em}
{\ECFJD}
\setlength{\parindent}{0pt}

%%% paragraph

\titleformat{\paragraph}[runin]
{\ECFJD\color{vert}}{\theparagraph}{1em}{}

%%% pied et tête de page

\renewcommand{\headrulewidth}{0pt}
\lhead{}
\cfoot{\ECFJD\Large\color{white}\fcolorbox{bleu}{bleu}{\thepage}}
\renewcommand{\headrulewidth}{0pt}


\begin{document}

\pagestyle{fancy}

\AddToShipoutPictureBG
{%
	\put(\LenToUnit{5mm},\LenToUnit{5mm})
	{%
		\begin{tikzpicture}
		\draw[fill=yellow!10,draw,thick,decorate,decoration = {random steps}] (0,0) rectangle +(\dimexpr\paperwidth-10mm,\dimexpr\paperheight-10mm);
		\end{tikzpicture}
	}
}


\title{Produit scalaire}

\subsection*{Les différentes formules}

\begin{minipage}{0.4\linewidth}
\hspace*{4mm}
\begin{tikzpicture}[>=latex]
\draw[dotted] (0,0) grid (7,5);
\draw[thick,->] (1,1) node[below] {A} -- (6,1) node[below] {B} node[midway,below] {5};
\draw[thick,->] (1,1) -- (4,4) node[above right] {C} node[midway,rotate=45,above] {$3\sqrt2$};
\begin{scope}[shift={(1,1)}]
\draw[thick,->,>=latex,red] (2,0) arc(0:45:2);
\node[right,red] at (22:2.2) {$\dfrac{\pi}{4}$};
\end{scope}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{0.25\linewidth}
\[
\boxed{\prodscal{AB}{AC}=\|\vv{AB}\|\times\|\vv{AC}\|\times\cos\angleor{AB}{AC}}
\]
\paragraph*{Exemple:}
\begin{align*}
\vv{\text{AB}}\cdot\vv{\text{AC}} & =\text{AB}\times\text{AC}\times\cos\angleor{AB}{AC}\\
& = 5\times3\sqrt{2}\times\cos\dfrac{\pi}{4}\\
& = 15\sqrt{2}\times\dfrac{\sqrt{2}}{2}\\
& = 15.
\end{align*}
\end{minipage}

\medskip

\begin{minipage}{0.4\linewidth}
\hspace*{4mm}
\begin{tikzpicture}[>=latex]
\draw[dotted] (0,0) grid (7,5);
\draw[thick,->] (1,1) node[below] {A} -- (6,1) node[below] {B};
\draw[thick,->] (1,1) -- (4,4) node[above right] {C};
\draw[dashed,thick,red] (4,4) -- (4,1) node[below] {H};
\end{tikzpicture}
\end{minipage}
\begin{minipage}{0.25\linewidth}
\[
\boxed{\prodscal{AB}{AC}=\begin{cases}AH \times AB\quad \text{ si }0 \leqslant \angleor{AB}{AC} \leqslant \dfrac{\pi}{2}\\ -AH\times AB\quad \text{ si }\dfrac{\pi}{2} \leqslant \angleor{AB}{AC} \leqslant \pi \end{cases}}
\]
\paragraph*{Exemple:}

\medskip

$\begin{aligned}
\vv{\text{AB}}\cdot\vv{\text{AC}} & =AH \times AB\\
& = 5 \times 3\\
& = 15.
\end{aligned}$
\end{minipage}

\medskip

\begin{minipage}{0.4\linewidth}
\begin{tikzpicture}[>=latex]
\draw[dotted] (0,0) grid (7,5);
\draw[thick,->] (1,1) node[below] {A} -- (6,2) node[below] {B};
\draw[thick,->] (1,1) -- (4,4) node[above right] {C};
\draw[very thick,->] (0,0) -- (7,0);
\draw[very thick,->] (0,0) -- (0,5);
\node[below left] at (0,0) {O};
\foreach \x in {1,2,3,4,5,6}
{
\draw[very thick] (\x,0.1) -- (\x,-0.1) node[below] {\x};
}
\foreach \y in {1,2,3,4}
{
\draw[very thick] (0.1,\y) -- (-0.1,\y) node[left] {\y};
}
\end{tikzpicture}
\end{minipage}
\begin{minipage}{0.33\linewidth}
\[
\boxed{\prodscal{AB}{AC}=xx' + yy'\qquad\text{avec}\qquad\vv{AB}\dbinom{x}{y}\text{ et }\vv{AC}\dbinom{x'}{y'}}
\]
\paragraph*{Exemple:} $\vv{AB}\dbinom{5}{1}$ et $\vv{AC}\dbinom{3}{3}$.

\medskip

$\begin{aligned}
\vv{\text{AB}}\cdot\vv{\text{AC}} & = 5\times3 + 1\times3\\
& = 15+3\\
& = 18.
\end{aligned}$
\end{minipage}

\paragraph*{Remarque:} à l'aide de la première et de la dernière formule, on peut calculer l'angle \angleor{AB}{AC} pour le dernier exemple. 

En effet, $\prodscal{AB}{AC}=18=AB \times AC \times \cos\angleor{AB}{AC}$. On en déduit alors que :
$$\cos\angleor{AB}{AC}=\dfrac{18}{AB\times AC}=\dfrac{18}{\sqrt{5^2+1^2}\times\sqrt{3^2+3^2}}\approx0,832050294338.$$
D'où $\angleor{AB}{AC}\approx\cos^{-1}(0,832050294338)\approx34^\circ$.

\newpage

\subsection*{Propriétés générales}

\paragraph*{Orthogonalité:} $\boxed{\vv{u} \perp \vv{v} \iff \vv{u}\cdot\vv{v}=0}$

\paragraph*{Distributivité:} $\boxed{\vv{u}\cdot\big(\vv{v}+\vv{w}\big)=\vv{u}\cdot\vv{v}+\vv{u}\cdot\vv{w}}$

\paragraph*{Commutativité:} $\boxed{\vv{u}\cdot\vv{v}=\vv{v}\cdot\vv{u}}$

\paragraph*{Bilinéarité:} $\boxed{\big(k_1\vv{u}\big)\cdot\big(k_2\vv{v}\big)=(k_1\times k_2)\vv{u}\cdot\vv{v}}$

\subsection*{Propriétés avec les normes}

\begin{minipage}{0.2\linewidth}
$$\boxed{\vv{u}\cdot\vv{u}=\|\vv{u}\|^2}$$
\end{minipage}
\begin{minipage}{0.45\linewidth}
$$\boxed{\|\vv{u}+\vv{v}\|^2 = \|\vv{u}\|^2+\|\vv{v}\|^2+2\vv{u}\cdot\vv{v}}$$
\end{minipage}
\begin{minipage}{0.33\linewidth}
\[
\boxed{
\begin{aligned}
\vv{u}\cdot\vv{v} & =\dfrac{1}{2}\big(\|\vv{u}\|^2+\|\vv{v}\|^2-\|\vv{u}-\vv{v}\|^2\big)\\[8pt]
\vv{u}\cdot\vv{v} & = \dfrac{1}{2}\big(\|\vv{u}+\vv{v}\|^2-\|\vv{u}\|^2-\|\vv{v}\|^2\big)\\[8pt]
\vv{u}\cdot\vv{v} & = \dfrac{1}{4}\big(\|\vv{u}+\vv{v}\|^2-\|\vv{u}-\vv{v}\|^2\big)
\end{aligned}
}
\]
\end{minipage}
\end{document}