{ "cells": [ { "cell_type": "raw", "metadata": {}, "source": [ "---\n", "title: Biostat 216 Homework 6\n", "subtitle: 'Due Nov 26 @ 11:59pm'\n", "format:\n", " html:\n", " theme: cosmo\n", " embed-resources: true\n", " number-sections: false\n", " toc: true\n", " toc-depth: 4\n", " toc-location: left\n", " code-fold: false\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Submit a PDF (scanned/photographed from handwritten solutions, or converted from RMarkdown or Jupyter Notebook) to Gracescope on BruinLearn." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Linear equations, matrix inverses, orthogonal projection\n", "\n", "### BV exercises\n", "\n", "BV 11.5, 11.12, 11.18" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Q1 \n", "\n", "Find the orthogonal projector into the plane spanned by the vectors $\\begin{pmatrix} 1 \\\\ 1 \\\\ 0 \\end{pmatrix}$ and $\\begin{pmatrix} -2 \\\\ 2 \\\\ 1 \\end{pmatrix}$. \n", "\n", "Find the orthogonal projection of the point $\\mathbf{1}_3$ into the plane spanned by the vectors $\\begin{pmatrix} 1 \\\\ 1 \\\\ 0 \\end{pmatrix}$ and $\\begin{pmatrix} -2 \\\\ 2 \\\\ 1 \\end{pmatrix}$. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Q2\n", "\n", "Matrices that satisfy $\\mathbf{A}' \\mathbf{A} = \\mathbf{A} \\mathbf{A}'$ are said to be _normal_. Give an example of asymmetric (not symmetric), normal matrix. If $\\mathbf{A}$ is normal, then prove that every vector in $\\mathcal{C}(\\mathbf{A})$ is orthogonal to every vector in $\\mathcal{N}(\\mathbf{A})$. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Q3\n", "\n", "Prove the following facts about triangular and orthogonal matrices.\n", "\n", "1. The product of two upper (lower) triangular matrices is upper (lower) triangular.\n", " \n", "2. The inverse of an upper (lower) triangular matrix is upper (lower) triangular.\n", " \n", "3. The product of two unit upper (lower) triangular matrices is unit upper (lower) triangular.\n", " \n", "4. The inverse of a unit upper (lower) triangular matrix is unit upper (lower) triangular.\n", " \n", "5. An orthogonal upper (lower) triangular matrix is diagonal." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Determinant\n", "\n", "### Q4\n", "\n", "Determinant.\n", "\n", "1. Find the determinant of the following two matrices without doing any computations:\n", "$$\n", "\\begin{pmatrix}\n", "0 & 0 & 1\\\\\n", "0 & 1 & 0 \\\\\n", "1 & 0 & 0\n", "\\end{pmatrix}, \\quad \\begin{pmatrix}\n", "0 & 0 & 1 & 0 \\\\\n", "0 & 1 & 0 & 0 \\\\\n", "1 & 0 & 0 & 0 \\\\\n", "0 & 0 & 0 & 1\n", "\\end{pmatrix}.\n", "$$ \n", "\n", "2. Let $\\mathbf{A} \\in \\mathbb{R}^{5 \\times 5}$ with $\\det(\\mathbf{A}) = -3$. Find $\\det(\\mathbf{A}^3)$, $\\det(\\mathbf{A}^{-1})$, and $\\det(2\\mathbf{A})$. \n", " \n", "3. Find the determinant of the matrix\n", "$\\begin{pmatrix}\n", "0 & 0 & 1 \\\\\n", "2 & 3 & 4 \\\\\n", "0 & 5 & 6\n", "\\end{pmatrix}$." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Eigenvalues and eigenvectors\n", "\n", "### Q5\n", "\n", "Diagonalize (show the steps to find eigenvalues and eigenvectors)\n", "$$\n", "\\mathbf{A} = \\begin{pmatrix} 2 & -1 \\\\ -1 & 2 \\end{pmatrix}\n", "$$\n", "and compute $\\mathbf{X} \\boldsymbol{\\Lambda}^k \\mathbf{X}^{-1}$ to prove the formula\n", "$$\n", "\\mathbf{A}^k = \\frac 12 \\begin{pmatrix} 1 + 3^k & 1 - 3^k \\\\ 1 - 3^k & 1 + 3^k \\end{pmatrix}.\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Q6\n", "\n", "Suppose the eigenvalues of a square matrix $\\mathbf{A} \\in \\mathbb{R}^{n \\times n}$ are $\\lambda_1, \\ldots, \\lambda_n$. Show that $\\det (\\mathbf{A}) = \\prod_{i=1}^n \\lambda_i$. Hint: $\\lambda_i$s are roots of the characteristic polynomial." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Q7\n", "\n", "Ture of false. For each statement, indicate it is true or false and gives a brief explanation.\n", "\n", "1. If the columns of $\\mathbf{X}$ (eigenvectors of a square matrix $\\mathbf{A}$) are linearly independent, then (a) $\\mathbf{A}$ is invertible; (b) $\\mathbf{A}$ is diagonalizable; (c) $\\mathbf{X}$ is invertible; (d) $\\mathbf{X}$ is diagonalizable.\n", " \n", "2. If the eigenvalues of $\\mathbf{A}$ are 2, 2, 5 then the matrix is certainly (a) invertible; (b) diagonalizable. \n", " \n", "3. If the only eigenvectors of $\\mathbf{A}$ are multiples of $\\begin{pmatrix} 1 \\\\ 4 \\end{pmatrix}$, then the matrix has (a) no inverse; (b) a repeated eigenvalue; (c) no diagonalization $\\mathbf{X} \\boldsymbol{\\Lambda} \\mathbf{X}^{-1}$. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Q8\n", "\n", "Let $\\mathbf{A} \\in \\mathbb{R}^{m \\times n}$ and $\\mathbf{B} \\in \\mathbb{R}^{n \\times m}$. Show that $\\mathbf{A} \\mathbf{B}$ and $\\mathbf{B} \\mathbf{A}$ share the same non-zero eigenvalues. Hint: examine the eigen-equations." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Q9\n", "\n", "Let\n", "$$\n", "\\mathbf{A} = \\begin{pmatrix}\n", "0 & 2 \\\\\n", "1 & 1\n", "\\end{pmatrix}, \\quad \\mathbf{B} = \\begin{pmatrix}\n", "1 & 2 \\\\\n", "0 & 1\n", "\\end{pmatrix}.\n", "$$\n", "\n", "1. Find eigenvalues and eigenvectors of $\\mathbf{A}$ and $\\mathbf{A}^{-1}$. Do they have same eigenvectors? What's the relationship between their eigenvalues? \n", "\n", "2. Find eigenvalues of $\\mathbf{B}$ and $\\mathbf{A} + \\mathbf{B}$. Are eigenvalues of $\\mathbf{A} + \\mathbf{B}$ equal to eigenvalues of $\\mathbf{A}$ plus eigenvalues of $\\mathbf{B}$? \n", "\n", "3. Find eigenvalues of $\\mathbf{A} \\mathbf{B}$ and $\\mathbf{B} \\mathbf{A}$. Are the eigenvalues of $\\mathbf{A} \\mathbf{B}$ equal to eigenvalues of $\\mathbf{A}$ times eigenvalues of $\\mathbf{B}$? Are the eigenvalues of $\\mathbf{A} \\mathbf{B}$ equal to eigenvalues of $\\mathbf{B} \\mathbf{A}$?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Q10\n", "\n", "Suppose $\\mathbf{A}$ has eigenvalues 0, 3, 5 with independent eigenvectors $\\mathbf{u}$, $\\mathbf{v}$, $\\mathbf{w}$ respectively. \n", "\n", "1. Give a basis for $\\mathcal{C}(\\mathbf{A})$ and a basis for $\\mathcal{N}(\\mathbf{A})$.\n", "\n", "2. Find a particular solution to $\\mathbf{A} \\mathbf{x} = \\mathbf{v} + \\mathbf{w}$. Find all solutions. \n", "\n", "3. Show that the linear equation $\\mathbf{A} \\mathbf{x} = \\mathbf{u}$ has no solution. " ] } ], "metadata": { "@webio": { "lastCommId": null, "lastKernelId": null }, "hide_input": false, "jupytext": { "formats": "ipynb,qmd" }, "kernelspec": { "display_name": "Julia 1.10.5", "language": "julia", "name": "julia-1.10" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.10.5" }, "toc": { "colors": { "hover_highlight": "#DAA520", "running_highlight": "#FF0000", "selected_highlight": "#FFD700" }, "moveMenuLeft": true, "nav_menu": { "height": "87px", "width": "252px" }, "navigate_menu": true, "number_sections": true, "sideBar": true, "skip_h1_title": true, "threshold": 4, "toc_cell": false, "toc_section_display": "block", "toc_window_display": false, "widenNotebook": false } }, "nbformat": 4, "nbformat_minor": 4 }