Homework, Material, and Software Manual for Math 4610
Routine Name: inducedinfnorm
Author: Tanner Wheeler
Language: Python. This code can be run on a python 3 compiler. The file can be imported and then the method will run.
Description/Purpose: This will compute the L-Infinity Matrix Norm given a matrix and a vector.
Input: The first input is a two dimensional vector array of dimensions nxn. The second input is a vector array of length n.
Output: This outputs a double number representing the value of the Induced L-Infinity Matrix Norm.
Usage/Example:
First define a a and d
a = [[float(0)] * n for i in range(0,m)]
d = [float(0) for i in range(0, 3)]
d[0] = 1
d[1] = 9
d[2] = 3
a[0][0] = float(1)
a[0][1] = float(8)
a[0][2] = float(2)
a[1][0] = float(4)
a[1][1] = float(4)
a[1][2] = float(1)
a[2][0] = float(5)
a[2][1] = float(6)
a[2][2] = float(2)
Now use a and d and print out the result of our method
print(inducedinfnorm(a, d))
This prints
8.777777777777779
Implementation/Code: The following is the code for inducedinfnorm(a, b)
def inducedinfnorm(a, b):
return norm1vec(mxv(a,b))/norm1vec(b)
Last Modified: December 2018