\documentclass{beamer}
\usepackage{polski}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tikz}
\title{Dowód twierdzenia Pitagorasa}

\author{Andrzej Kokosza}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}
\begin{frame}
\begin{center}
\begin{tikzpicture}
\draw [help lines] (0,0) grid(7,7);
\draw [fill=blue!50,  opacity=0.5] (0,3) -- (0,0) -- (4,0);
\draw [fill=green!50,  opacity=0.5] (4,0) -- (7,0) -- (7,4);
\draw [fill=red!50,  opacity=0.5] (7,4) -- (7,7) -- (3,7);
\draw [fill=yellow!50,  opacity=0.5] (3,7) -- (0,7) -- (0,3);
\draw [thick] (0,3) -- (4,0) -- (7,4) -- (3,7) -- (0,3);
\node at (2,-0.2) {a}; \node at (5.5,-0.2) {b}; \node at (7.2,2) {a}; \node at (7.2,5.5) {b};
\node at (1.5,7.2) {b}; \node at (5.,7.2) {a}; \node at (-0.2,1.5) {b}; \node at (-0.2,5) {a};
\node at (1.85, 1.85) {c}; \node at (5.15, 1.85) {c}; \node at (5.15,5.15) {c}; \node at (1.85, 5.15) {c};
\node at (3.5,3.5) {$c^2$};
\end{tikzpicture}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
\begin{tikzpicture}
\draw [help lines] (0,0) grid(7,7);
\draw [fill=blue!50,  opacity=0.5] (0,3) -- (0,0) -- (4,0);
\draw [fill=green!50,  opacity=0.5] (0,3) -- (4,3) -- (4,0);
\draw [fill=red!50,  opacity=0.5] (7,3) -- (7,7) -- (4,7);
\draw [fill=yellow!50,  opacity=0.5]  (7,3) -- (4,3) -- (4,7);
\node at (2,-0.2) {a}; \node at (-0.2,1.5) {b}; 
\node at (5.5,7.2) {b}; \node at (7.2,5) {a}; 
\node at (1.85, 1.85) {c};  \node at (5.15,5.15) {c};
\draw [thick] (0,3) rectangle (4,7);
\draw [thick] (4,0) rectangle (7,3);
\node at (2,5) {$a^2$};  \node at (5.5,1.5) {$b^2$};
\end{tikzpicture}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
\begin{tikzpicture}
\draw [help lines] (0,0) grid(7,7);
\draw [fill=blue!50,  opacity=0.7] (0,3) -- (0,0) -- (4,0);
\draw [fill=green!50,  opacity=0.7] (4,0) -- (7,0) -- (7,4);
\draw [fill=red!50,  opacity=0.7] (7,4) -- (7,7) -- (3,7);
\draw [fill=yellow!50,  opacity=0.7] (3,7) -- (0,7) -- (0,3);
\draw [help lines] (0,0) grid(7,7);
\draw [fill=blue!50,  opacity=0.7] (0,3) -- (0,0) -- (4,0);
\draw [fill=green!50,  opacity=0.7] (0,3) -- (4,3) -- (4,0);
\draw [fill=red!50,  opacity=0.7] (7,3) -- (7,7) -- (4,7);
\draw [fill=yellow!50,  opacity=0.7]  (7,3) -- (4,3) -- (4,7);
\draw [thick] (0,3) rectangle (4,7);
\draw [thick] (4,0) rectangle (7,3);
\draw [thick] (0,3) -- (4,0) -- (7,4) -- (3,7) -- (0,3);
\end{tikzpicture}
\end{center}
\end{frame}

\begin{frame}
\begin{center}
\begin{tikzpicture}
Oba kwadraty mają to samo pole powierzchni. Zauważmy, że kolorowe trójkąty w obu kwadratach mają tą samo pole powierzchni. Zatem pole białych kwadratów jest takie samo w obu, czyli
$$a^2+b^2=c^2$$
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}