{ "cells": [ { "cell_type": "raw", "metadata": {}, "source": [ "---\n", "title: Biostat 216 Homework 4\n", "subtitle: 'Due Oct 30 @ 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 or Quarto) to Gradescope in BruinLearn.\n", "\n", "## Q1. \n", "\n", "Show the following claims.\n", "\n", "1. If $\\mathcal{S}_1$ and $\\mathcal{S}_2$ are two vector spaces of same order, then their **intersection** $\\mathcal{S}_1 \\cap \\mathcal{S}_2$ is a vector space.\n", " \n", "2. If $\\mathcal{S}_1$ and $\\mathcal{S}_2$ are two vector spaces of same order, then their **union** $\\mathcal{S}_1 \\cup \\mathcal{S}_2$ is not necessarily a vector space.\n", "\n", "3. The **span** of a set of $\\mathbf{x}_1,\\ldots,\\mathbf{x}_k \\in \\mathbb{R}^n$, defined as the set of all possible linear combinations of $\\mathbf{x}_i$s\n", "$$\n", " \\text{span} \\{\\mathbf{x}_1,\\ldots,\\mathbf{x}_k\\} = \\left\\{\\sum_{i=1}^k \\alpha_i \\mathbf{x}_i: \\alpha_i \\in \\mathbb{R} \\right\\},\n", "$$\n", "is a vector space in $\\mathbb{R}^n$.\n", "\n", "4. The null space of an matrix $\\mathbf{A} \\in \\mathbb{R}^{m \\times n}$ is a vector space." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Q2.\n", "\n", "Let\n", "$$\n", "\\mathbf{A}_1 = \\begin{pmatrix}\n", "1 & 3 & -2 \\\\\n", "3 & 9 & -6 \\\\\n", "2 & 6 & -4\n", "\\end{pmatrix}, \\quad \\mathbf{A}_2 = \\begin{pmatrix}\n", "1 & 2 & 3 \\\\\n", "4 & 5 & 6 \\\\\n", "7 & 8 & 9\n", "\\end{pmatrix}.\n", "$$ \n", "\n", "1. Find the matrices $\\mathbf{C}_1$ and $\\mathbf{C}_2$ containing independent columns of $\\mathbf{A}_1$ and $\\mathbf{A}_2$. \n", " \n", "2. Find a rank factorization $\\mathbf{A} = \\mathbf{C} \\mathbf{R}$ of each of $\\mathbf{A}_1$ and $\\mathbf{A}_2$. \n", " \n", "3. Produce a basis for the column spaces of $\\mathbf{A}_1$ and $\\mathbf{A}_2$. What are the dimensions of those column spaces (the number of independent vectors)? What are the ranks of $\\mathbf{A}_1$ and $\\mathbf{A}_2$? How many independent rows in $\\mathbf{A}_1$ and $\\mathbf{A}_2$?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Q3.\n", "\n", "1. Show that an **orthocomplement set** of a set $\\mathcal{X}$ (not necessarily a subspace) in a vector space $\\mathcal{V} \\subseteq \\mathbb{R}^m$\n", "$$\n", " \\mathcal{X}^\\perp = \\{ \\mathbf{u} \\in \\mathcal{V}: \\langle \\mathbf{x}, \\mathbf{u} \\rangle = 0 \\text{ for all } \\mathbf{x} \\in \\mathcal{X}\\}\n", "$$\n", "is a vector space.\n", "\n", "2. Show that, if $\\mathcal{S}$ is a subspace of a vector space $\\mathcal{V} \\subseteq \\mathbb{R}^m$, then $\\mathcal{S} = (\\mathcal{S}^\\perp)^\\perp$." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Q4.\n", "\n", "In this exercise, we show the fact \n", "$$\n", "\\text{rank}(\\mathbf{A} + \\mathbf{B}) \\le \\text{rank}(\\mathbf{A}) + \\text{rank}(\\mathbf{B})\n", "$$ \n", "for any two matrices $\\mathbf{A}$ and $\\mathbf{B}$ of same size in steps.\n", "\n", "1. Show that the sum of two vector spaces $\\mathcal{S}_1$ and $\\mathcal{S}_2$ of same order\n", "$$\n", "\\mathcal{S}_1 + \\mathcal{S}_2 = \\{\\mathbf{x}_1 + \\mathbf{x}_2: \\mathbf{x}_1 \\in \\mathcal{S}_1, \\mathbf{x}_2 \\in \\mathcal{S}_2\\}\n", "$$\n", "is a vector space. \n", "\n", "2. Show that $\\text{dim}(\\mathcal{S}_1 + \\mathcal{S}_2) \\le \\text{dim}(\\mathcal{S}_1) + \\text{dim}(\\mathcal{S}_2)$.\n", " \n", "3. Show that $\\mathcal{C}(\\mathbf{A} + \\mathbf{B}) \\subseteq \\mathcal{C}(\\mathbf{A}) + \\mathcal{C}(\\mathbf{B})$. \n", " \n", "4. Conclude that $\\text{rank}(\\mathbf{A} + \\mathbf{B}) \\le \\text{rank}(\\mathbf{A}) + \\text{rank}(\\mathbf{B})$. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Q5. Fundamental theorem of ranks\n", "\n", "1. Show that $\\text{rank}(\\mathbf{A}) = \\text{rank}(\\mathbf{A}'\\mathbf{A})$ and $\\text{rank}(\\mathbf{A}') = \\text{rank}(\\mathbf{A}\\mathbf{A}')$. Hint: we did it in class, using rank-nullity theorem.\n", "\n", "2. Show that $\\text{rank}(\\mathbf{A}) = \\text{rank}(\\mathbf{A}')$ using part 1. Hint: we showed this remarkable result using rank factorization in class. This question asks you to show it using part 1." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Q6.\n", "\n", "1. If $\\mathbf{A}$ and $\\mathbf{B}$ are two matrices with the same number of rows, then\n", "$$\n", "\\mathcal{C}(\\begin{pmatrix} \\mathbf{A} \\,\\,\\, \\mathbf{B} \\end{pmatrix}) = \\mathcal{C}(\\mathbf{A}) + \\mathcal{C}(\\mathbf{B}).\n", "$$\n", "\n", "2. If $\\mathbf{A}$ and $\\mathbf{C}$ are two matrices with the same number of columns, then\n", "$$\n", "\\mathcal{R} \\left( \\begin{pmatrix} \\mathbf{A} \\\\ \\mathbf{C} \\end{pmatrix} \\right) = \\mathcal{R}( \\mathbf{A} ) + \\mathcal{R}( \\mathbf{C} )\n", "$$\n", "and\n", "$$\n", "\\mathcal{N} \\left( \\begin{pmatrix} \\mathbf{A} \\\\ \\mathbf{C} \\end{pmatrix} \\right) = \\mathcal{N}( \\mathbf{A} ) \\cap \\mathcal{N}( \\mathbf{C} ).\n", "$$" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "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 }