aboutsummaryrefslogtreecommitdiff
path: root/semestre 2/maths/1-calcul matriciel/cours.tex
blob: ec551c7e690171ffaa84990df485ba50ebab9cfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
%%=====================================================================================
%%
%%       Filename:  cours.tex
%%
%%    Description:  
%%
%%        Version:  1.0
%%        Created:  03/06/2024
%%       Revision:  none
%%
%%         Author:  YOUR NAME (), 
%%   Organization:  
%%      Copyright:  Copyright (c) 2024, YOUR NAME
%%
%%          Notes:  
%%
%%=====================================================================================
\documentclass[a4paper, titlepage]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[french]{babel}
\usepackage{amsmath, amssymb}
\usepackage{amsthm}
\usepackage[svgnames]{xcolor}
\usepackage{thmtools}
\usepackage{lipsum}
\usepackage{framed}
\usepackage{parskip}
\usepackage{titlesec}
%\usepackage[cal=rsfs,calscale=1.03]{mathalpha}

\renewcommand{\familydefault}{\sfdefault}

% figure support
\usepackage{import}
\usepackage{xifthen}
\pdfminorversion=7
\usepackage{pdfpages}
\usepackage{transparent}
\newcommand{\incfig}[1]{%
	\def\svgwidth{\columnwidth}
	\import{./figures/}{#1.pdf_tex}
}

\pdfsuppresswarningpagegroup=1

\colorlet{defn-color}{DarkBlue}
\colorlet{props-color}{Blue}
\colorlet{warn-color}{Red}
\colorlet{exemple-color}{Green}
\colorlet{corol-color}{Orange}
\newenvironment{defn-leftbar}{%
  \def\FrameCommand{{\color{defn-color}\vrule width 3pt} \hspace{10pt}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}}%
 {\endMakeFramed}
\newenvironment{warn-leftbar}{%
  \def\FrameCommand{{\color{warn-color}\vrule width 3pt} \hspace{10pt}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}}%
 {\endMakeFramed}
\newenvironment{exemple-leftbar}{%
  \def\FrameCommand{{\color{exemple-color}\vrule width 3pt} \hspace{10pt}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}}%
 {\endMakeFramed}
\newenvironment{props-leftbar}{%
  \def\FrameCommand{{\color{props-color}\vrule width 3pt} \hspace{10pt}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}}%
 {\endMakeFramed}
\newenvironment{corol-leftbar}{%
  \def\FrameCommand{{\color{corol-color}\vrule width 3pt} \hspace{10pt}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}}%
 {\endMakeFramed}

\def \freespace {1em}
\declaretheoremstyle[headfont=\sffamily\bfseries,%
 notefont=\sffamily\bfseries,%
 notebraces={}{},%
 headpunct=,%
 bodyfont=\sffamily,%
 headformat=\color{defn-color}Définition~\NUMBER\hfill\NOTE\smallskip\linebreak,%
 preheadhook=\vspace{\freespace}\begin{defn-leftbar},%
 postfoothook=\end{defn-leftbar},%
]{better-defn}
\declaretheoremstyle[headfont=\sffamily\bfseries,%
 notefont=\sffamily\bfseries,%
 notebraces={}{},%
 headpunct=,%
 bodyfont=\sffamily,%
 headformat=\color{warn-color}Attention\hfill\NOTE\smallskip\linebreak,%
 preheadhook=\vspace{\freespace}\begin{warn-leftbar},%
 postfoothook=\end{warn-leftbar},%
]{better-warn}
\declaretheoremstyle[headfont=\sffamily\bfseries,%
 notefont=\sffamily\bfseries,%
notebraces={}{},%
headpunct=,%
 bodyfont=\sffamily,%
 headformat=\color{exemple-color}Exemple~\NUMBER\hfill\NOTE\smallskip\linebreak,%
 preheadhook=\vspace{\freespace}\begin{exemple-leftbar},%
 postfoothook=\end{exemple-leftbar},%
]{better-exemple}
\declaretheoremstyle[headfont=\sffamily\bfseries,%
 notefont=\sffamily\bfseries,%
 notebraces={}{},%
 headpunct=,%
 bodyfont=\sffamily,%
 headformat=\color{props-color}Proposition~\NUMBER\hfill\NOTE\smallskip\linebreak,%
 preheadhook=\vspace{\freespace}\begin{props-leftbar},%
 postfoothook=\end{props-leftbar},%
]{better-props}
\declaretheoremstyle[headfont=\sffamily\bfseries,%
 notefont=\sffamily\bfseries,%
 notebraces={}{},%
 headpunct=,%
 bodyfont=\sffamily,%
 headformat=\color{props-color}Théorème~\NUMBER\hfill\NOTE\smallskip\linebreak,%
 preheadhook=\vspace{\freespace}\begin{props-leftbar},%
 postfoothook=\end{props-leftbar},%
]{better-thm}
\declaretheoremstyle[headfont=\sffamily\bfseries,%
 notefont=\sffamily\bfseries,%
 notebraces={}{},%
 headpunct=,%
 bodyfont=\sffamily,%
 headformat=\color{corol-color}Corollaire~\NUMBER\hfill\NOTE\smallskip\linebreak,%
 preheadhook=\vspace{\freespace}\begin{corol-leftbar},%
 postfoothook=\end{corol-leftbar},%
]{better-corol}

\declaretheorem[style=better-defn]{defn}
\declaretheorem[style=better-warn]{warn}
\declaretheorem[style=better-exemple]{exemple}
\declaretheorem[style=better-corol]{corol}
\declaretheorem[style=better-props, numberwithin=defn]{props}
\declaretheorem[style=better-thm, sibling=props]{thm}
\newtheorem*{lemme}{Lemme}%[subsection]
%\newtheorem{props}{Propriétés}[defn]

\newenvironment{system}%
{\left\lbrace\begin{align}}%
{\end{align}\right.}

\newenvironment{AQT}{{\fontfamily{qbk}\selectfont AQT}}

\usepackage{LobsterTwo}
\titleformat{\section}{\newpage\LobsterTwo \huge\bfseries}{\thesection.}{1em}{}
\titleformat{\subsection}{\vspace{2em}\LobsterTwo \Large\bfseries}{\thesubsection.}{1em}{}
\titleformat{\subsubsection}{\vspace{1em}\LobsterTwo \large\bfseries}{\thesubsubsection.}{1em}{}

\newenvironment{lititle}%
{\vspace{7mm}\LobsterTwo \large}%
{\\}

\renewenvironment{proof}{$\square$ \footnotesize\textit{Démonstration.}}{\begin{flushright}$\blacksquare$\end{flushright}}

\title{Calcul matriciel}
\author{William Hergès\thanks{Sorbonne Université - Faculté des Sciences, Faculté des Lettres}}

\begin{document}
	\maketitle
	\tableofcontents
	\newpage
	\section{Définition}
	\begin{defn}
		Une matrice est un l'ensemble de nombre $\{a_{p,q}\in E, p,q\in \mathcal{SN}\}$$\mathcal{SN}$ est un intervale de $\mathbb{N}^*$. On note l'ensemble de ces matrices $\mathcal{M}_{p,q}(E)$.
	\end{defn}
	\begin{defn}
		Une matrice carrée est l'ensemble des matrices $\mathcal{M}_{k,k}(\mathbb{K})$ ($k\in\mathbb{N}^*$).

		On utilise l'abus de notation $\mathcal{M}_k(\mathbb{K})$ pour parler des matrices carrées d'ordre $k\in\mathbb{N}^*$.
	\end{defn}
	\subsection{Opérations}
	\begin{defn}[Somme de matrices]
		Une somme de matrice est la somme  des nombres des matrices.

		Si on note $(a_{p,q})$ les nombres de la matrice $A$ et $(b_{p,q})$ les nombres de la matrice $B$, alors
		$$ A+B = \{a_{p,q}+b_{p,q},p,q\in\mathcal{SN}\} $$

		Alors :
		$$ \begin{pmatrix} a_{1,1} & \cdots & a_{1,q} \\ \vdots & & \vdots \\ a_{p,1} & \cdots & a_{p,q} \end{pmatrix} + \begin{pmatrix} b_{1,1} & \cdots & b_{1,q} \\ \vdots & & \vdots \\ b_{p,1} & \cdots & b_{p,q} \end{pmatrix} = \begin{pmatrix} a_{1,1} + b_{1,1} & \cdots & a_{1,q} + b_{1,q} \\ \vdots & & \vdots \\ a_{p,1} + b_{p,1} & \cdots & a_{p,q} + b_{p,q} \end{pmatrix} $$
	\end{defn}
	\begin{defn}[Produit externe]
		Soit $A\in\mathcal{M}_{p,q}(\mathbb{K})$ et $t\in\mathbb{K}$.

		On a :
		$$ t A = (ta_{p,q})_{p,q\in\mathcal{SN}} $$
	\end{defn}
	\begin{props}
		On a :
		\begin{itemize}
			\item $s(tA) = t(sA)$
			\item $t(A+B) = tA+tB$
			\item $(t+s)A = tA+sA$
		\end{itemize}
		pour $t,s\in\mathbb{K}$ et $A,B\in\mathcal{M}_{p,q}(\mathbb{K})$.
	\end{props}
	\begin{proof}
		\AQT
	\end{proof}
	\begin{props}
		L'élément neutre pour l'addition est $\tilde 0$, i.e. l'ensemble $(a_{p,q})_{p,q\in\mathcal{SN}} = 0$.
	\end{props}
	\begin{proof}
		\AQT
	\end{proof}
	\begin{defn}[Produit matriciel]
		Soient $p,q,r\in\mathbb{N}^*$. Soient $A\in\mathcal{M}_{p,r}(\mathbb{K})$ et $B\in\mathcal{M}_{r,q}(\mathbb{K})$.

		Le produit $AB$ est :
		$$ \forall (i,k)\in[|1,p|]\times[|1,q|],\quad (ab)_{i,k} = \sum_{j=1}^{r} a_{i,j}b_{j,k} $$
	\end{defn}
	\begin{warn}
		On a besoin que le nombre de colonnes de la matrice $A$ soit égal au nombre de lignes de la matrice $B$.
	\end{warn}
	C'est une forme de produit scalaire !
	\section{Matrices spéciales}
	\begin{defn}
		Une matrice de $\mathcal{M}_{p}(\mathbb{K})$ est dite diagonale si et seulement si :
		$$ \forall (i,j)\in[|1,p|]^2,\quad i\neq j \implies a_{i,j} = 0 $$
	\end{defn}
	\begin{props}
		La multiplication matricielle des matrices diagonales est commutative et se fait très simplement.
	\end{props}
	\begin{props}
		L'élément neutre de $M_p(\mathbb{K})$ est la matrice diagonale notée $I_p$ telle que :
		$$ \forall (i,j)\in[|1,p|]^2,\quad i=j\implies 1 $$
	\end{props}
	\begin{defn}
		On note $A^{-1}$ la matrice inverse de $A$, i.e.
		$$ A A^{-1} = A^{-1} A = I_p $$
	\end{defn}
	\begin{thm}
		Soit $A\in\mathcal{M}_2(\mathbb{K})$.

		$A^{-1}$ existe si et seulement si :
		$$ ad-bc = 0 $$$A = \begin{pmatrix} a&b\\c&d \end{pmatrix}, a,b,c,d\in\mathbb{K}$

		Ainsi,
		$$ A^{-1} = \frac{1}{ad-bc}\begin{pmatrix} d&-b\\-c&a \end{pmatrix} $$
	\end{thm}
	\begin{lititle}
		Mais qu'est-ce $ad-bc$ ?
	\end{lititle}
	Il s'agit d'un déterminant de la matrice $A$. C'est une notion essentielle que l'on retrouve partout en maths.

	\begin{thm}
		Si $A$ et $B$ sont inversibles, alors $AB$ l'est aussi et :
		$$ (AB)^{-1} = B^{-1}A^{-1} $$
	\end{thm}
	\section{Système linéaire}
	\begin{thm}
		On peut remplacer un système linéaire à $x$ inconnu par une matrice $A\in\mathcal{M}_{x}$ contenant les coefficiants, $X\in\mathcal{M}_{x,1}$ contenant les inconnues et $B\in\mathcal{M}_{x,1}$ contenant les résultats. On a alors :
		$$ AX=B $$

		Si $A$ est inversible, alors il existe une unique solution à ce système linéaire tel que :
		$$ X=A^{-1}B $$
	\end{thm}
	\begin{exemple}
		Le système 
		\begin{align*}
			a_{1,1}x_1 &+ a_{1,2}x_2 + \ldots + a_{1,p}x_p &= b_1\\
			\vdots& &= \vdots \\
			a_{p,1}x_1 &+ a_{p,2}x_2 + \ldots + a_{p,p}x_p &= b_p
		\end{align*}
		est équivalent à
		$$ \begin{pmatrix} a_{1,1}&a_{1,2}&\ldots&a_{1,p}\\\vdots&&&\vdots\\a_{p,1}&a_{p,2}&\ldots&a_{p,p} \end{pmatrix} \begin{pmatrix} x_1\\\vdots\\x_p \end{pmatrix} = \begin{pmatrix} b_1\\\vdots\\b_p \end{pmatrix}  $$
	\end{exemple}
	\begin{lititle}
		Opérations élémentaires
	\end{lititle}
	Ce sont les opérations qui ne font perdre aucune information au système. Il y a :
	\begin{itemize}
		\item permutation de deux lignes, notée $P_{i_1 \to i_2}$ (échange des lignes $i_1$ et $i_2$)
		\item dilatation d'une ligne, notée $D_{i,\alpha\in\mathbb{R}^*}$ (dilatation de la ligne $i$ par $\alpha$)
		\item transvection (somme de deux lignes), notée $T_{i_1,i_2,t\in\mathbb{R}}$ (transvection de la ligne $i_1$ par $i_2$ avec comme facteur $t$)
	\end{itemize}
	C'est-à-dire, on peut faire des combinaisons linéaires !
	
	Faire cette opération, c'est équivalent à multiplier par une matrice carrée inversible.

	Par exemple, pour $P_{2\to 3}$, on a la matrice :
	$$ \begin{pmatrix} 1&0&0\\0&0&1\\0&1&0 \end{pmatrix}  $$
	ou $D_{2, \alpha\in\mathbb{R}^*}$ est :
	$$ \begin{pmatrix} 1&0&0\\0&\alpha&0\\0&0&1 \end{pmatrix}  $$
	ou encore $T_{2,3,t}$ est :
	$$ \begin{pmatrix} 1&0&0\\0&1&t\\0&0&1 \end{pmatrix}  $$
	\begin{thm}
		Si $r$ est le rang de $A|B$ (voir le pivot de Gauss), si $p$ est le nombre de colonnes de $A$ et $q$ le nombre de lignes de $A$, alors :
		\begin{itemize}
			\item si $r=p$, alors pour tout $B$ il existe une solution (existence)
			\item si $r=q$, alors il existe une unique solution (unicité)
		\end{itemize}
	\end{thm}
	\section{Déterminent}
	\begin{thm}
		$A$ est inversible si et seulement si le rang de $A$ est égal au nombre de colomnes (et de lignes) et si et seulement si le déterminent de $A$ est différent de 0. (On note $\mathrm{det}(A)$ le déterminent de $A$.)
	\end{thm}
	\begin{props}
		On a :
		\begin{itemize}
			\item $\mathrm{det}(D)$, où $D$ est une matrice diagonale, est la multiplication des coefficiants de la diagonale
			\item $\mathrm{det}(T)$, où $T$ est une matrice triangulaire, est aussi la multiplication des coefficiants de la diagonale
			\item si on multiplie une colonne par $\alpha$, alors $\mathrm{det}(A') = \alpha\mathrm{det}(A)$ (pour tout $\alpha$) 
			\item le déterminent ne change pas avec une transvection ou une transposée
		\end{itemize}
	\end{props}
	Ces propriétés suffisent à calculer tous les déterminents

	\begin{exemple}
		Calculons le déterminent de $\small\begin{pmatrix} 1&3\\2&1 \end{pmatrix}$.
		\begin{align*}
			\mathrm{det}\begin{pmatrix} 1&3\\2&1 \end{pmatrix} &= \mathrm{det}\begin{pmatrix} 1&3\\0&-5 \end{pmatrix}  \\
										 &= -5\times\mathrm{det}\begin{pmatrix} 1&3\\0&1 \end{pmatrix}  \\
										 &= -5\times\mathrm{det}\begin{pmatrix} 1&0\\0&1 \end{pmatrix}  \\
										 &= -5 
		\end{align*}
	\end{exemple}
\end{document}