File:DeterminantOfMatrix.png

Summary

Description
English: Determinant of matrix
Date
Source Own work
Author ARAKI Satoru
\documentclass[border=0.5cm]{standalone}
\usepackage{tikz, amsmath, bm}
\usetikzlibrary{positioning, colorbrewer}

\begin{document}
\begin{tikzpicture}

% Matrix A
% [[1, 1/2],
%  [1/2, 1]]
\draw[->, thick] (-1, 0) -- (1, 0);
\node at (0, 0) [above, shift = {(0, +0.2)}] {$A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$};
\node at (0, 0) [below, shift = {(0, -0.2)}] {${{!}}A{{!}} = ad - bc$};

\begin{scope}[xshift = -4cm]
    % Circle
    \clip (0, 0) circle (2.5);
    \filldraw[fill = Set1-I!3, dotted] (0, 0) circle (2.5);

    % Unit Square
    \fill[Set1-C!25] (0, 0) -- (1, 0) -- (1, 1) -- (0, 1) -- cycle;
    \node at (1/2, 1/2) {$1$};

    % Original Vertical Lines
    \foreach \x in {-10, -9, ..., 10} {
        \draw[Set1-A] (\x, -10) -- (\x, 10);
    }
    % Original Horizontal Lines
    \foreach \y in {-10, -9, ..., 10} {
        \draw[Set1-B] (-10, \y) -- (10, \y);
    }

    % Origin
    \node at (0, 0) [circle, fill, inner sep = 1] {};

    % Vectors e1 and e2
    \draw[->, thick] (0, 0) -- (1, 0) node[near end, below, shift = {(0.4, -0.2)}, fill = Set1-I!3] {$\bm{e}_1 = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$};
    \draw[->, thick] (0, 0) -- (0, 1) node[near end, left,  shift = {(-0.2, 0.4)}, fill = Set1-I!3] {$\bm{e}_2 = \begin{bmatrix} 0 \\ 1 \end{bmatrix}$};
\end{scope}

% [x, y] maps to [x + y/2, x/2 + y]
\begin{scope}[xshift = +4cm]
    % Circle
    \clip (0, 0) circle (2.5);
    \filldraw[fill = Set1-I!3, dotted] (0, 0) circle (2.5);

    % Transformed Square
    \fill[Set1-C!25] (0, 0) -- (1, 1/2) -- (3/2, 3/2) -- (1/2, 1) -- cycle;
    \node at (13/16, 13/16) {${{!}}A{{!}}$}; % slightly away from the middle (3/4, 3/4)

    % Transformed Vertical Lines
    \foreach \x in {-10, -9, ..., 10} {
        \draw[Set1-A] (\x - 5, \x/2 - 10) -- (\x + 5, \x/2 + 10);
    }
    % Transformed Horizontal Lines
    \foreach \y in {-10, -9, ..., 10} {
        \draw[Set1-B] (-10 + \y/2, -5 + \y ) -- (10 + \y/2, 5 + \y);
    }

    % Origin
    \node at (0, 0) [circle, fill, inner sep = 1] {};

    % Vectors Ae1 and Ae2
    \draw[->, thick] (0, 0) -- (1, 1/2) node[midway, below right, fill = Set1-I!3] {$A\bm{e}_1 = \begin{bmatrix} a \\ c \end{bmatrix}$};
    \draw[->, thick] (0, 0) -- (1/2, 1) node[midway, above left,  fill = Set1-I!3] {$A\bm{e}_2 = \begin{bmatrix} b \\ d \end{bmatrix}$};
\end{scope}

\end{tikzpicture}
\end{document}

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#DeterminantOfMatrix.png
Category:Self-published work Category:Determinant Category:TikZ graphics Category:Linear functions
Category:CC-Zero Category:Determinant Category:Linear functions Category:Self-published work Category:TikZ graphics