Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

final version. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions .ipynb_checkpoints/Exercise 3.3-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Exercise 3.3\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Vector and matrix p-norms are related by various inequalities, often involving the dimensions m or n. \n",
"\n",
"For each of the following, verify the inequality and give an example of a nonzero vector or matrix(for general m,n) for which equality is achieved.\n",
"\n",
"In this problem x is an m-vector and A is an m x n matrix."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## (a) $$ ||x||_\\infty \\leq ||x||_2 $$\n",
"\n",
"$$ \\Vert x \\Vert_\\infty $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Lets consider a vector x; \n",
"\\begin{equation}\n",
" x\n",
" =\n",
" \\begin{bmatrix}\n",
" 1 \\\\\n",
" 2 \\\\\n",
" 3\n",
" \\end{bmatrix}\n",
"\\end{equation}\n",
"\n",
"Here, \n",
"\\begin{equation*}\n",
"||x||_\\infty = max |x_i| , where (1\\leq i \\leq m) = 3 \n",
"\\end{equation*}\n",
"\n",
"\\begin{equation*}\n",
"||x||_2 = (\\sum_{i=1}^m |x_i|^2)^{1/2} = 3.742\n",
"\\end{equation*}\n",
"\n",
"\\begin{equation*}\n",
"3 \\leq 3.742\n",
"\\end{equation*}\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### (b) $$||x||_2 \\leq \\sqrt{m}||x||_\\infty $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\\begin{equation*}\n",
"\\sqrt{m}||x||_\\infty = 1.732*3 = 5.196\n",
"\\end{equation*}\n",
"\n",
"\\begin{equation*}\n",
"3.742 \\leq 5.196\n",
"\\end{equation*}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### (c) $$||A||_\\infty \\leq \\sqrt{n}||A||_2 $$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### (d) $$||A||_2 \\leq \\sqrt{m}||A||_\\infty $$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Octave",
"language": "octave",
"name": "octave"
},
"language_info": {
"file_extension": ".m",
"help_links": [
{
"text": "GNU Octave",
"url": "https://www.gnu.org/software/octave/support.html"
},
{
"text": "Octave Kernel",
"url": "https://github.com/Calysto/octave_kernel"
},
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "octave",
"version": "4.2.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
247 changes: 247 additions & 0 deletions Exercise 3.3.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"# Exercise 3.3\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"Vector and matrix p-norms are related by various inequalities, often involving the dimensions m or n. \n",
"\n",
"For each of the following, verify the inequality and give an example of a nonzero vector or matrix(for general m,n) for which equality is achieved.\n",
"\n",
"In this problem x is an m-vector and A is an m x n matrix."
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"## (a) $$ \\Vert x\\Vert_\\infty \\leq \\Vert x\\Vert_2 $$\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"$$ \\Vert x\\Vert_\\infty = max |x_i| , where 1 \\leq i \\leq m$$\n",
"$$ \\Vert x\\Vert_2 = (\\sum_{i=1}^m |x_i|^2)^{1/2} $$\n",
"\n",
"\\begin{equation*}\n",
"max |x_i| = max (|x_i|^2)^{1/2} \\leq (\\sum_{i=1}^m |x_i|^2)^{1/2}\n",
"\\end{equation*}\n",
"\n",
"So, it can be seen that;\n",
"\n",
"\\begin{equation*}\n",
"\\Vert x\\Vert_\\infty \\leq \\Vert x\\Vert_2\n",
"\\end{equation*}\n",
"\n",
"For example, lets consider a vector x; \n",
"\\begin{equation*}\n",
" x\n",
" =\n",
" \\begin{bmatrix}\n",
" 1 \\\\\n",
" 2 \\\\\n",
" 3\n",
" \\end{bmatrix}\n",
"\\end{equation*}\n",
"\n",
"\\begin{equation*}\n",
"\\Vert x\\Vert_\\infty = 3 \n",
"\\end{equation*}\n",
"\n",
"\\begin{equation*}\n",
"\\Vert x\\Vert_2 = 3.742\n",
"\\end{equation*}\n",
"\n",
"\\begin{equation*}\n",
"3 \\leq 3.742\n",
"\\end{equation*}\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"## (b) $$\\Vert x\\Vert_2 \\leq \\sqrt{m}\\Vert x\\Vert_\\infty $$"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"This can be verified by following; \n",
"\n",
"\\begin{equation*}\n",
"(\\sum_{i=1}^m |x_i|^2)^{1/2} \\leq (\\sum_{i=1}^m max (|x_i|^2))^{1/2} = (m\\Vert x\\Vert_\\infty^2)^{1/2} = \\sqrt{m}\\Vert x\\Vert_\\infty\n",
"\\end{equation*}\n",
"\n",
"For the same x vector above, \n",
"\n",
"\\begin{equation*}\n",
"\\sqrt{m}\\Vert x\\Vert_\\infty = 1.732*3 = 5.196\n",
"\\end{equation*}\n",
"\n",
"\\begin{equation*}\n",
"3.742 \\leq 5.196\n",
"\\end{equation*}"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"## (c) $$\\Vert A\\Vert_\\infty \\leq \\sqrt{n}\\Vert A\\Vert_2 $$"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"\\begin{equation*}\n",
"\\Vert A\\Vert_\\infty = sup \\frac{\\Vert Ax\\Vert_\\infty}{\\Vert x\\Vert_\\infty}\n",
"\\end{equation*}\n",
"\n",
"Since we know that $ \\Vert x\\Vert_\\infty \\leq \\Vert x\\Vert_2 $;\n",
"\n",
"\\begin{equation*}\n",
"sup \\frac{\\Vert Ax\\Vert_\\infty}{\\Vert x\\Vert_\\infty} \\leq sup \\frac{\\Vert Ax\\Vert_2}{\\Vert x\\Vert_\\infty}\n",
"\\end{equation*}\n",
"\n",
"\n",
"As well, since $ \\Vert x\\Vert_2 \\leq \\sqrt{m}\\Vert x\\Vert_\\infty $ and $x$ is in $\\mathbb{C}^n$ ;\n",
"\n",
"\\begin{equation*}\n",
"sup \\frac{\\Vert Ax\\Vert_2}{\\Vert x\\Vert_\\infty} \\leq sup \\frac{\\Vert Ax\\Vert_2}{\\Vert x\\Vert_2/\\sqrt{n}} = \\sqrt{n}\\Vert A\\Vert_2\n",
"\\end{equation*}\n",
"\n",
"\n",
"Lets consider a vector x; \n",
"\\begin{equation}\n",
" A\n",
" =\n",
" \\begin{bmatrix}\n",
" 1 & 3\\\\\n",
" 2 & 1\\\\\n",
" 3 & 4\n",
" \\end{bmatrix}\n",
"\\end{equation}\n",
"\n",
"Here, \n",
"\\begin{equation*}\n",
"\\Vert A\\Vert_\\infty = max \\Vert a_{i}^{*}\\Vert _1 , where (1\\leq i \\leq m) = 7 \n",
"\\end{equation*}\n",
"\n",
"However, finding the 2-norm is a bit of a problem. \n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"source": [
"## (d) $$||A||_2 \\leq \\sqrt{m}||A||_\\infty $$"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"source": [
"\\begin{equation*}\n",
"\\Vert A\\Vert_2 = sup \\frac{\\Vert Ax\\Vert_2}{\\Vert x\\Vert_2}\n",
"\\end{equation*}\n",
"\n",
"From the inequality b and $Ax$ is in $\\mathbb{C}^m$, we can write:\n",
"\n",
"\\begin{equation*}\n",
"sup \\frac{\\Vert Ax\\Vert_2}{\\Vert x\\Vert_2} \\leq sup \\sqrt{m}\\frac{\\Vert Ax\\Vert_\\infty}{\\Vert x\\Vert_2}\n",
"\\end{equation*}\n",
"\n",
"And from the inequality a,\n",
"\n",
"\\begin{equation*}\n",
"sup \\sqrt{m}\\frac{\\Vert Ax\\Vert_\\infty}{\\Vert x\\Vert_2} \\leq sup \\sqrt{m}\\frac{\\Vert Ax\\Vert_\\infty}{\\Vert x \\Vert_\\infty} = \\sqrt{m} \\Vert A\\Vert_\\infty\n",
"\\end{equation*}"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Octave",
"language": "octave",
"name": "octave"
},
"language_info": {
"file_extension": ".m",
"help_links": [
{
"text": "GNU Octave",
"url": "https://www.gnu.org/software/octave/support.html"
},
{
"text": "Octave Kernel",
"url": "https://github.com/Calysto/octave_kernel"
},
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "octave",
"version": "4.2.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Binary file added octave-workspace
Binary file not shown.