{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Lineare Algebra Zusammenfassung"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy import Add, Matrix, Eq, Expr, MatMul, Mul, Equality, Equivalent, Function, Symbol, init_printing, latex\n",
    "from IPython.display import Markdown, Math\n",
    "init_printing(latex_printer=lambda *args, **kwargs: latex(*args, mul_symbol='dot', **kwargs))\n",
    "\n",
    "def calculate(vars: dict, calculation: Expr, precision: int = None):\n",
    "    for key in vars:\n",
    "        display(Eq(key, vars[key], evaluate=False))\n",
    "\n",
    "        if isinstance(vars[key], Expr):\n",
    "            display(Eq(key, vars[key].subs(vars, simultaneous=True), evaluate=False))\n",
    "\n",
    "    display(Eq(calculation, calculation.subs(vars, simultaneous=True), evaluate=False))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Linearer Spann im $\\mathbb{R}^2$\n",
    "  - 2 Kollineare Vektoren  \n",
    "    Ursprungsgerade\n",
    "  - 2 nicht-kollineare Vektoren $\\mathbb{R}^2$\n",
    "\n",
    "Im $\\mathbb{R}^3$\n",
    "  - 3 kollineare Vektoren Ursprungsgerade\n",
    "  - 3 komplanare, nicht-kollineare Vektoren  \n",
    "    Ursprungsebene\n",
    "  - 3 linear unabhängige Vektoren  \n",
    "    $\\mathbb{R}^3$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAIwAAAAzCAYAAABFXOCeAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAHEklEQVR4Ae2dYXbUNhDHl7wegKY3gBtAOEHDDQicgHCD9vVbvvXRG1BOAOEGwAko3ABu0JAbpP+fViO0smW7u5Z3Y0vveSWNZY3012hmJNnJnZubm9Vcw8XFxd22vol+3UavtB8I5LA7+lFklqnP6tX35Ho5y56O36nLBDdwvPxpfD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mEEy1kCGwhFVS+OLBOq0VwiRLV+N3G2NhZEtua77LL0HDsMcS/5OtsGFlSNS4FQF2gxu4/QcNRzrqin1htgAAAABJRU5ErkJggg==",
      "text/latex": [
       "$\\displaystyle M = \\left[\\begin{matrix}1 & 2 & 3\\\\4 & 5 & 6\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "    ⎡1  2  3⎤\n",
       "M = ⎢       ⎥\n",
       "    ⎣4  5  6⎦"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAG4AAABLCAYAAACROrJ+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAHYUlEQVR4Ae2d23EVORCGDcUzZbxVvGMyAG8EmAy4RIDJYLf2zW8UZABEwCUD2AhYyAACoGrh1Cbg/b/xaNCMpLmemTk6UlfJ0ujWrf6llkbSHF+5uLg42Dc6Pz+/ozZ9DrTrvdIfBtJ2JloyfpUwxz6BlHblmi9hj+JeqC0owKZv9sMOh597ZLuvuAfE7ztwL9U7YwGqhpPkflWL0IPiiEoCOBraSlIGZvWd3F2FN62Zt5goXpjBP8sqT+T/4FnxX8q4Vm/fR5y38VLOoRJey6EslOadSxQ/C5WgYQ0wfQUpjGn8TJzcxzI66F0NpuxxghSzkXso91TNfLNCUwEJ3hVJFkYfI57R30lJAteplfkznIrFV4HFyLeJkXao+E4LkIGz1bZcGIC+CaDQnNoE1JEsyTnO0cLCEQIs9B7JQulA6Z0LlDziFgYtxE5gARom0qw0Q1mL+Axcq3oWTWRRwq4OmwadlIHrVNH8GQTWS3FhzguZUEeIDJyjkmUjBNaZOB7Jr97p+kiQgeujpZnyCCy2r27bI03hY1wXywxcl4ZmShc4LEZ+l99cjAAmOzqtlF8HDg5+KzV0JD/0XtWqxKGJ5YhiMfJRYeY3m04V17lASRY4KcdsLbGLAb1THCcJH+Q7O/NFju39+aCqMIfMb03qfIejQMrA9V7BNTU79Vkd4/bUOvIcN1WDK5XPwK2k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XOIy4DF6kGIhU7j7gMXKQaiFTsZEecNhKcYx3FsXN0HAOW1V5lDMJuWca/AUp1Fifg8glDXDtcjCSDOes0PN8ozshk4hw/ZeB+lNpg5HHqwd4se7RsAc5O4sPIZkOZG17Fpr18nnGdH/enDNxcZ33Sey8CIEaXfdLCqO91Mp4ycL20O0cmgcXZHyP9nl2/4ntv4Ce7OLEVtkKYo5yNgBptlpMecVIct60wT/wsFHMOc1znwkD5phJXJLhXwqh7LPevHPMaN8xs06koP6UMHIC9laKKXi8f4PiB6yVOweENnYhfdeNA4Z9yT+ScQ+zL7L/+JmsqpZzaF0Z6ZlFAb7evM/zS1JZC4mNA44qgfcEYDm/lXlt5glyTBS6gEcDr9XuRgfJDon2rR66NAKy5bRasL0ng1KP5gLG4WxnQjBkVgeTx0eK7KUsb31cZZruVkgROGqFH+8A5QltS7twLFEyyjz/sId9ovEwp/6YKHLfVfLsTp9JLr1VdTYvDH5hHfaOK7TZeEzplSBU47obWFiF6Np/z9r7xNhyvyxLixaqRC8bVPqXCjMBHck8uc7X/TfJ1QEriHYpfWDDgYSLZu+R79ra5p12bA1LFh1VtU4Z7iutlppMEDv1KQcwjoy6jDsCnNatkqN7hWjN6ElM1lR5VxBWVgYsLr0raDFylirgCGbi48KqkzcBVqogrsO+rSnb7m4hE/w/cadC+Ate21O/cTmoivdJz9XLu4/8/TVYvrgesoF4AAAAASUVORK5CYII=",
      "text/latex": [
       "$\\displaystyle N = \\left[\\begin{matrix}1 & 2\\\\3 & 4\\\\5 & 6\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "    ⎡1  2⎤\n",
       "    ⎢    ⎥\n",
       "N = ⎢3  4⎥\n",
       "    ⎢    ⎥\n",
       "    ⎣5  6⎦"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "[encoded data, 5212 characters]",
      "text/latex": [
       "$\\displaystyle M \\cdot N = \\left[\\begin{matrix}9 & 12 & 15\\\\19 & 26 & 33\\\\29 & 40 & 51\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "      ⎡9   12  15⎤\n",
       "      ⎢          ⎥\n",
       "M⋅N = ⎢19  26  33⎥\n",
       "      ⎢          ⎥\n",
       "      ⎣29  40  51⎦"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "M = Symbol(\"M\")\n",
    "N = Symbol(\"N\")\n",
    "calculate({M: Matrix([[1, 2, 3], [4, 5, 6]]), N: Matrix([[1, 2], [3, 4], [5, 6]])}, M*N)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Die Funktionen $f: \\mathbb{R} \\rightarrow \\mathbb{R}: x \\mapsto m \\cdot x$ ($m \\in \\mathbb{R}$) sind lineare Abbildungen."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAMcAAAAVCAYAAADy8/riAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFqElEQVR4Ae2b61HcMBDHLwwFkJRw6YCEDqADIBUkdACTT/CNgQ6AChjoADrg0QF0kOM6IP+fkIysk3UPn3U+w84I2auVtA/triQfvdfX117dcnh42K87Rpv6d02epnTbJT3FZFnp1YSjo6N9DbFec5i2de9budrGV2v46aDdR2z+hahSBVLAmdqGtv1Y7+7ZoPS+rYcN1QeWpjOVZMLph6rPOyPUnATpqt1Dm1dmDhGeSJffVC5V/qhsqhSg9jW9/FXdOcdASMl1qmrPygnqE6QBq49O2j20eaVzSA84BI6Bg9yr3Kr4gPOQWbKBmN9Uga9cgHzI+QnvGshq90XaPOocMCRdkBlu9UzZUiltqdS2K1zuLQc8UbKAlQ85s82ZRbB6k+S2+8JsHnUO6W5L5TniEEatwnPWeDYv3f+DnLvdF3O8hB/I7sbmq75KJDxbFhyDzDHQ+5Wt91T7AE24zSra1Q9vd9ufDT3/Vumr/FIB7kRz/faY56/H03fN+KD3IuvZtgvVOxFukBN5C/oIT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s+ieVNar2pvAa75tlf15ja2xTlQeqsZTW1/lqar9I+LRh0o2u2uuhdl8RRFmW8VFA84bYfquCjZEqNwRdag5KVODZOQcRPYyoGciL99kjt8w0b9EHeT8hHcN5Lb7wmzOmQNhudFgsfRUT7TtER0pnWtV0n4W0Fz8CDK2lZhkfq6BLz1Cvjbza4CovFYu5Jt1Pm+q7jxafWSzu+ZbmM05cxjnsDXXXtMA9GQdbnzaDmSBb1I2e3HOGmcoPsE0+/XcmTHBTqualsXutWye/E/AScyhBUbmYGs21Ye5ScZeFI11oGvVpZuORfHTxnm7ZveYzf8DaygUuvdtqZkAAAAASUVORK5CYII=",
      "text/latex": [
       "$\\displaystyle f{\\left(x + y \\right)} = m \\cdot \\left(x + y\\right)$"
      ],
      "text/plain": [
       "f(x + y) = m⋅(x + y)"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "f = Function('f')\n",
    "m = Symbol('m')\n",
    "x = Symbol('x')\n",
    "y = Symbol('y')\n",
    "la = Symbol('\\lambda')\n",
    "display(Eq(f(x + y), m * (x + y)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 8400 characters]",
      "text/latex": [
       "$\\displaystyle f{\\left(\\left[\\begin{matrix}x\\\\y\\\\z\\\\w\\end{matrix}\\right] \\right)} = \\left[\\begin{matrix}w + x\\\\- y + z\\\\- 2 \\cdot w - x + y\\\\2 \\cdot x - y\\\\w + z\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "         ⎡   w + x    ⎤\n",
       " ⎛⎡x⎤⎞   ⎢            ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢   -y + z   ⎥\n",
       " ⎜⎢y⎥⎟   ⎢            ⎥\n",
       "f⎜⎢ ⎥⎟ = ⎢-2⋅w - x + y⎥\n",
       " ⎜⎢z⎥⎟   ⎢            ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢  2⋅x - y   ⎥\n",
       " ⎝⎣w⎦⎠   ⎢            ⎥\n",
       "         ⎣   w + z    ⎦"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "[encoded data, 5284 characters]",
      "text/latex": [
       "$\\displaystyle f{\\left(\\left[\\begin{matrix}1\\\\0\\\\0\\\\0\\end{matrix}\\right] \\right)} = \\left[\\begin{matrix}1\\\\0\\\\-1\\\\2\\\\0\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "         ⎡1 ⎤\n",
       " ⎛⎡1⎤⎞   ⎢  ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢0 ⎥\n",
       " ⎜⎢0⎥⎟   ⎢  ⎥\n",
       "f⎜⎢ ⎥⎟ = ⎢-1⎥\n",
       " ⎜⎢0⎥⎟   ⎢  ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢2 ⎥\n",
       " ⎝⎣0⎦⎠   ⎢  ⎥\n",
       "         ⎣0 ⎦"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "[encoded data, 5104 characters]",
      "text/latex": [
       "$\\displaystyle f{\\left(\\left[\\begin{matrix}0\\\\1\\\\0\\\\0\\end{matrix}\\right] \\right)} = \\left[\\begin{matrix}0\\\\-1\\\\1\\\\-1\\\\0\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "         ⎡0 ⎤\n",
       " ⎛⎡0⎤⎞   ⎢  ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢-1⎥\n",
       " ⎜⎢1⎥⎟   ⎢  ⎥\n",
       "f⎜⎢ ⎥⎟ = ⎢1 ⎥\n",
       " ⎜⎢0⎥⎟   ⎢  ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢-1⎥\n",
       " ⎝⎣0⎦⎠   ⎢  ⎥\n",
       "         ⎣0 ⎦"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "[encoded data, 5016 characters]",
      "text/latex": [
       "$\\displaystyle f{\\left(\\left[\\begin{matrix}0\\\\0\\\\1\\\\0\\end{matrix}\\right] \\right)} = \\left[\\begin{matrix}0\\\\1\\\\0\\\\0\\\\1\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "         ⎡0⎤\n",
       " ⎛⎡0⎤⎞   ⎢ ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢1⎥\n",
       " ⎜⎢0⎥⎟   ⎢ ⎥\n",
       "f⎜⎢ ⎥⎟ = ⎢0⎥\n",
       " ⎜⎢1⎥⎟   ⎢ ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢0⎥\n",
       " ⎝⎣0⎦⎠   ⎢ ⎥\n",
       "         ⎣1⎦"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "[encoded data, 5212 characters]",
      "text/latex": [
       "$\\displaystyle f{\\left(\\left[\\begin{matrix}0\\\\0\\\\0\\\\1\\end{matrix}\\right] \\right)} = \\left[\\begin{matrix}1\\\\0\\\\-2\\\\0\\\\1\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "         ⎡1 ⎤\n",
       " ⎛⎡0⎤⎞   ⎢  ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢0 ⎥\n",
       " ⎜⎢0⎥⎟   ⎢  ⎥\n",
       "f⎜⎢ ⎥⎟ = ⎢-2⎥\n",
       " ⎜⎢0⎥⎟   ⎢  ⎥\n",
       " ⎜⎢ ⎥⎟   ⎢0 ⎥\n",
       " ⎝⎣1⎦⎠   ⎢  ⎥\n",
       "         ⎣1 ⎦"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = Symbol('x')\n",
    "y = Symbol('y')\n",
    "z = Symbol('z')\n",
    "w = Symbol('w')\n",
    "f = Function('f')\n",
    "\n",
    "def realF(x, y, z, w):\n",
    "    return Matrix([x + w, z - y, y - x - 2 * w, 2 * x - y, z + w])\n",
    "\n",
    "display(Eq(f(Matrix([x, y, z, w])), realF(x, y, z, w), evaluate=False))\n",
    "input = 1, 0, 0, 0\n",
    "display(Eq(f(Matrix(input)), realF(*input), evaluate=False))\n",
    "input = 0, 1, 0, 0\n",
    "display(Eq(f(Matrix(input)), realF(*input), evaluate=False))\n",
    "input = 0, 0, 1, 0\n",
    "display(Eq(f(Matrix(input)), realF(*input), evaluate=False))\n",
    "input = 0, 0, 0, 1\n",
    "display(Eq(f(Matrix(input)), realF(*input), evaluate=False))"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "184a40b3dca75cecb3b866e2d98ad88cc8239a23b64498ef3e7e2e1f5f9f2635"
  },
  "kernelspec": {
   "display_name": "Python 3.10.2 ('ZHAW-Pb88adSo')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.2"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
