{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Worked solutions - Quiz 3" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This page contains sketch notes to some of the quiz questions from Quiz 3. It is not comprehensive. We have tried to include most of the questions where it may not be obvious how to get to the correct answer. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 6\n", "\n", "$$\n", "\\begin{align*}\n", "A = \\begin{pmatrix} 1 &4 \\\\ 5 &1 \\\\ 2 &3 \\end{pmatrix}\n", "\\end{align*}\n", "$$\n", "\n", "$$\n", "\\begin{align*}\n", "B = \\begin{pmatrix} 4 &2 &1 \\\\ 3 &6 &3 \\\\ 2 & 5 & 5 \\end{pmatrix}\n", "\\end{align*}\n", "$$\n", "\n", "$$\n", "\\begin{align*}\n", "C = \\begin{pmatrix} 2&4 \\\\ 3 &1 \\\\ 6 &0 \\end{pmatrix}\n", "\\end{align*}\n", "$$\n", "\n", "$$\n", "\\begin{align*}\n", "A + C = \\begin{pmatrix} 1 &4 \\\\ 5 &1 \\\\ 2 &3 \\end{pmatrix} + \\begin{pmatrix} 2&4 \\\\ 3 &1 \\\\ 6 &0 \\end{pmatrix} = \n", " \\begin{pmatrix} 1+2 &4+4 \\\\ 5+3 &1+1 \\\\ 2+6 &3+0 \\end{pmatrix} = \n", " \\begin{pmatrix} 3 &8 \\\\ 8 &2 \\\\ 8 &3 \\end{pmatrix} \n", " \\end{align*}\n", "$$\n", "\n", "$$\n", "\\begin{align*}\n", "A - C = \\begin{pmatrix} 1 &4 \\\\ 5 &1 \\\\ 2 &3 \\end{pmatrix} - \\begin{pmatrix} 2&4 \\\\ 3 &1 \\\\ 6 &0 \\end{pmatrix} = \n", " \\begin{pmatrix} 1-2 &4-4 \\\\ 5-3 &1-1 \\\\ 2-6 &3-0 \\end{pmatrix} = \n", " \\begin{pmatrix} -1 &0 \\\\ 2 &0 \\\\ -4 &3 \\end{pmatrix} \n", " \\end{align*}\n", "$$\n", "\n", "$$\n", "\\begin{align*}\n", "A^T + C^T = (A+C)^T = \\begin{pmatrix} 3 &8 \\\\ 8 &2 \\\\ 8 &3 \\end{pmatrix} ^2 = \\begin{pmatrix} 3 &8 &8 \\\\ 8 &2 &3 \\end{pmatrix}\n", " \\end{align*} \n", "$$ " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 7\n", " \n", "$$\n", "\\begin{align*}\n", "2 A = 2 \\times \\begin{pmatrix} 1 &4 \\\\ 5 &1 \\\\ 2 &3 \\end{pmatrix} = \\begin{pmatrix} 2 \\times 1 &2 \\times 4 \\\\ 2 \\times 5 &2 \\times 1 \\\\ 2 \\times2 &2 \\times 3 \\end{pmatrix} = \\begin{pmatrix} 2 &8 \\\\ 10 &2 \\\\ 4 &6 \\end{pmatrix}\n", "\\end{align*}\n", "$$\n", "\n", "$$\n", "\\begin{align*}\n", "-1(A-C)3 = -3 \\times (A-C) = -3 \\times \\begin{pmatrix} -1 &0 \\\\ 2 &0 \\\\ -4 &3 \\end{pmatrix} = \\begin{pmatrix} -3 \\times -1 &-3 \\times 0 \\\\ -3 \\times 2 &-3 \\times 0 \\\\ -3 \\times -4 &-3 \\times 3 \\end{pmatrix} = \\begin{pmatrix} 3 &0 \\\\ -6 & 0 \\\\ 12 &-9 \\end{pmatrix} \n", "\\end{align*}\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 9\n", "\n", "$$\n", "\\begin{align*}\n", "D = \\begin{pmatrix} 3 \\\\ -1 \\end{pmatrix}\n", "\\end{align*}\n", "$$\n", "\n", "$$\n", "\\begin{align*}\n", " A D = \\begin{pmatrix} 1 &4 \\\\ 5 &1 \\\\ 2 &3 \\end{pmatrix} \\times \\begin{pmatrix} 3 \\\\ -1 \\end{pmatrix} = \\begin{pmatrix} 1\\times 3 + 4\\times -1 \\\\ 5 \\times 3 + 1 \\times -1 \\\\ 2 \\times 3 + 3 \\times -1 \\end{pmatrix} =\\begin{pmatrix} 3 - 4 \\\\ 15 -1 \\\\ 6 - 3 \\end{pmatrix} =\\begin{pmatrix} -1 \\\\ 14 \\\\ 3 \\end{pmatrix}\n", "\\end{align*} \n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 10\n", "\n", "$$\n", "\\begin{align*}\n", "B A = \\begin{pmatrix} 4 &2 &1 \\\\ 3 &6 &3 \\\\ 2 & 5 & 5 \\end{pmatrix} \\begin{pmatrix} 1 &4 \\\\ 5 &1 \\\\ 2 &3 \\end{pmatrix} & = \\begin{pmatrix} 4 \\times 1 + 2\\times 5 + 1\\times 2 & 4 \\times 4 + 2\\times 1 + 1\\times 3 \\\\ 3\\times 1 + 6\\times 5+ 3\\times 2 &3\\times 4 + 6\\times 1 + 3\\times 3 \\\\ 2\\times 1 + 5\\times 5 + 5\\times 2 &2\\times 4 + 5\\times 1 + 5\\times 3 \\end{pmatrix} \\\\ & = \\begin{pmatrix} 4 + 10 + 2 & 16 + 2 + 3 \\\\ 3 + 30 + 6 & 12 + 6 + 9 \\\\ 2 + 25 + 10 &8 + 5 + 15 \\end{pmatrix} \\\\ & = \\begin{pmatrix} 16 &21 \\\\ 39 &27 \\\\ 37 &28 \\end{pmatrix} \n", "\\end{align*}\n", "$$\n", "\n", "$AB$ is undefined. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 12\n", "\n", "$$\n", "\\begin{align*}\n", "E = \\begin{pmatrix} 2 &1 \\\\ -3 &0 \\end{pmatrix}\n", "\\end{align*}\n", "$$\n", "\n", "$$\n", "det(E) = 2 \\times 0 - (1 \\times -3) = 3\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 13\n", "\n", "$$\n", "\\begin{align*}\n", "E^{-1} = \\frac{1}{det(E)}\\begin{pmatrix} 0 &-1 \\\\ 3 &2 \\end{pmatrix} = \\frac{1}{3}\\begin{pmatrix} 0 &-1 \\\\ 3 &2 \\end{pmatrix} = \\begin{pmatrix} 0 &-1/3 \\\\ 1 &2/3 \\end{pmatrix}\n", "\\end{align*}\n", "$$\n", "\n", "Check: \n", "\n", "$$\n", "\\begin{align*}\n", "E E^{-1} = \\begin{pmatrix} 2 &1 \\\\ -3 &0 \\end{pmatrix} \\begin{pmatrix} 0 &-1/3 \\\\ 1 &2/3 \\end{pmatrix} & = \\begin{pmatrix} 2 \\times 0 + 1 \\times 1 &2 \\times -1/3 + 1\\times 2/3 \\\\ -3 \\times 0 + 0 \\times 1 &-3 \\times -1/3 + 0 \\times 2/3 \\end{pmatrix} \\\\ & = \\begin{pmatrix} 1 &0 \\\\ 0 &1 \\end{pmatrix} = I\n", "\\end{align*}\n", "$$\n", "\n", "as expected. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 14\n", "\n", "$$\n", "\\begin{align*}\n", "E^2 = \\begin{pmatrix} 2 &1 \\\\ -3 &0 \\end{pmatrix}\\begin{pmatrix} 2 &1 \\\\ -3 &0 \\end{pmatrix} = \\begin{pmatrix} 2 \\times 2 + 1 \\times -3 & 2 \\times 1 + 1 \\times 0 \\\\ -3 \\times 2 + 0 \\times -3 &-3 \\times 1 + 0 \\times 0 \\end{pmatrix} = \\begin{pmatrix} 1 &2 \\\\ -6 &-3 \\end{pmatrix} \\neq E\n", "\\end{align*}\n", "$$\n", "\n", "so $E$ is not idempotent. \n", "\n", "$$\n", "\\begin{align*}\n", "E^T = \\begin{pmatrix} 2 &1 \\\\ -3 &0 \\end{pmatrix}^T = \\begin{pmatrix} 2 &-3 \\\\ 1 &0 \\end{pmatrix} \\neq E^{-1}\n", "\\end{align*}\n", "$$\n", "\n", "so $E$ is not orthogonal. \n" ] } ], "metadata": { "kernelspec": { "display_name": "R", "language": "R", "name": "ir" }, "language_info": { "codemirror_mode": "r", "file_extension": ".r", "mimetype": "text/x-r-source", "name": "R", "pygments_lexer": "r", "version": "3.6.1" } }, "nbformat": 4, "nbformat_minor": 4 }