Lecture Notes LaTeX Template
A free LaTeX template for lecture notes with coloured boxes for definitions, theorems, examples and remarks, automatically numbered, so the structure of a subject stands out.

LaTeX source
% Lecture notes template: colour boxes for definitions, theorems, examples and remarks, proofs, a TikZ figure
% and a running header. It is filled with a short example (eigenvalues and eigenvectors)
% so you can see how each box looks. Replace the example with your own notes.
\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[a4paper,margin=2.5cm]{geometry}
\usepackage{microtype}
\usepackage{amsmath,amssymb,mathtools}
\usepackage{amsthm}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage{tikz}
\usetikzlibrary{babel}
\usepackage[most]{tcolorbox}
\usepackage[hidelinks]{hyperref}
% ---- Course details: edit these ----
\newcommand{\coursename}{Linear Algebra}
\newcommand{\notestitle}{Eigenvalues and Eigenvectors}
\newcommand{\notesauthor}{Your Name}
\newcommand{\notesdate}{Autumn 2026}
\title{\notestitle}
\author{\coursename \\ \notesauthor}
\date{\notesdate}
% Running header and footer
\pagestyle{fancy}
\fancyhf{}
\lhead{\coursename}
\rhead{\notestitle}
\cfoot{\thepage}
\setlength{\headheight}{14pt}
% Shortcuts for number sets and common operators
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\DeclareMathOperator{\id}{Id}
% Boxes, numbered per section: Definition, Theorem, Example and Remark
\newtcbtheorem[number within=section]{definition}{Definition}{colback=blue!5,colframe=blue!60!black,fonttitle=\bfseries}{def}
\newtcbtheorem[number within=section]{theorem}{Theorem}{colback=red!4,colframe=red!60!black,fonttitle=\bfseries}{thm}
\newtcbtheorem[number within=section]{example}{Example}{colback=green!4,colframe=green!45!black,fonttitle=\bfseries}{ex}
\newtcolorbox{remark}{colback=yellow!10,colframe=orange!70!black,title=Remark,fonttitle=\bfseries}
\begin{document}
\maketitle
\thispagestyle{fancy}
\tableofcontents
\section{Definitions}
\begin{definition}{Eigenvalue and eigenvector}{eigen}
Let $A$ be an $n\times n$ matrix. A scalar $\lambda\in\C$ is an \emph{eigenvalue} of $A$ if there is a
nonzero vector $v\in\C^n$, called an \emph{eigenvector}, such that
\begin{equation}
Av = \lambda v .
\end{equation}
\end{definition}
Geometrically, $A$ only stretches (or flips) an eigenvector: its direction does not change.
Figure~\ref{fig:eigen} shows this for the matrix of Example~\ref{ex:matrix} below.
\begin{figure}[htbp]
\centering
\begin{tikzpicture}[scale=1.1, >=stealth]
\draw[->, gray] (-2.4,0) -- (3.4,0) node[right] {$x$};
\draw[->, gray] (0,-2.4) -- (0,3.4) node[above] {$y$};
\draw[->, thick, blue!70!black] (0,0) -- (1,1) node[below right] {$v_1$};
\draw[->, thick, blue!70!black, dashed] (0,0) -- (3,3) node[above left] {$Av_1=3v_1$};
\draw[->, thick, red!70!black] (0,0) -- (1,-1) node[below left] {$v_2$};
\draw[->, thick, red!70!black, dashed] (0,0) -- (1,-1);
\node[red!70!black, right] at (1.1,-1.2) {$Av_2=v_2$};
\end{tikzpicture}
\caption{The matrix $A$ stretches $v_1=(1,1)$ by a factor of $3$ and leaves $v_2=(1,-1)$ unchanged.}
\label{fig:eigen}
\end{figure}
\section{Main result}
\begin{theorem}{Characteristic polynomial}{charpoly}
A scalar $\lambda$ is an eigenvalue of $A$ if and only if $\det(A-\lambda \id)=0$.
\end{theorem}
\begin{proof}
$Av=\lambda v$ with $v\neq 0$ is equivalent to $(A-\lambda \id)v=0$ having a nonzero solution. This
happens exactly when $A-\lambda \id$ is not invertible, that is, when its determinant is zero.
\end{proof}
\begin{remark}
The polynomial $p(\lambda)=\det(A-\lambda\id)$ has degree $n$, so $A$ has at most $n$ different
eigenvalues. Over $\C$ it has exactly $n$ eigenvalues counted with multiplicity.
\end{remark}
\section{Examples}
\begin{example}{A symmetric matrix}{matrix}
Find the eigenvalues and eigenvectors of
\[
A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}.
\]
The characteristic polynomial is
\[
\det(A-\lambda\id) = (2-\lambda)^2 - 1 = (\lambda-1)(\lambda-3),
\]
so the eigenvalues are $\lambda_1=3$ and $\lambda_2=1$. Solving $(A-\lambda_i\id)v=0$ gives the
eigenvectors
\[
v_1 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \qquad v_2 = \begin{pmatrix} 1 \\ -1 \end{pmatrix}.
\]
\end{example}
\begin{enumerate}[label=(\alph*)]
\item The trace of $A$ equals $\lambda_1+\lambda_2=4$ and its determinant equals $\lambda_1\lambda_2=3$.
\item The eigenvectors are orthogonal: for a real symmetric matrix, eigenvectors of different eigenvalues always are.
\end{enumerate}
\end{document}