Classroom Tips and Techniques:
Norm of a Matrix
Robert J. Lopez
Emeritus Professor of Mathematics - Rose Hulman Institute of Technology
Maple Fellow - Maplesoft
Introduction
The greatest benefits from bringing Maple into the classroom are realized when the static pedagogy of a printed textbook is enlivened by the interplay of symbolic, graphic, and numeric calculations made possible by technology. It is not enough merely to compute or check answers with Maple. To stop after noting that indeed, Maple can compute the correct answer is not a pedagogical breakthrough.
Getting Maple to compute the correct answer is just the first step. Using Maple to bring insights not easily realized with by-hand calculations should be the goal of everyone who sets a hand to improving the learning experiences of students.
For example, let's look at how the notion of a matrix norm might be taught in a Maple environment. In particular, let's consider the definition
where the vector norm || A x || is the Euclidean, or 2-norm, so that || A || is actually , the 2-norm of the matrix A.
First we will show that Maple easily computes , then we'll show how Maple can be used to gain some insight into just what this number means.
Initialize
Tools_Load Package: Student Calculus 1
Loading Student:-Calculus1
Tools_Load Package: Student Multivariate Calculus
Loading Student:-MultivariateCalculus
Matrix palette: 2×2 matrix template Type entries and use Tab key to move through fields.
Context Menu: Assign to a Name_A
Matrix palette: 2×1 matrix template for vector Type entries and use Tab key to move through fields.
Context Menu: Assign to a Name_U
Preliminary Views
In Figure 1, the surface represents the Euclidean norm of , that is,
where . The black curve drawn in the surface is the intersection of the surface with the lift of the unit circle up to the surface. The norm of A is the maximum of on the unit circle, that is, along the black curve traced in the surface.
In Figure 2, the slider controls the value of for the unit vector . As u rotates around the unit circle, the green vector, , grows and shrinks. The length of the vector is displayed beneath the slider. The norm of A itself is the length of the longest green vector. In other words, Figure 2 demonstrates that the norm of a matrix is the largest factor by which the length of a unit vector can be changed by the matrix.
use plots, Student:-LinearAlgebra in module() local A,V,U,N,f,p1,p2,p3; A:=Matrix(2,2,[1,2,3,4]); V:=<x,y>; U:=<cos(t),sin(t)>; N:=Norm(A.U,2); f:=simplify(Norm(A.V,2)); p1:=spacecurve([cos(t),sin(t),N],t=0..2*Pi,color=black,thickness=2); p2:=plot3d(f,x=-1.1..1.1,y=-1.1..1.1,view=0..6,axes=frame,transparency=.4,style=surface,color=cyan); p3:=display(p1,p2,orientation=[20,70,0],tickmarks=[3,3,6]); print(p3); end module: end use:
Figure 1 Norm of AV and the lift of the unit circle
=
Figure 2 Unit vector u (in black); (in green)
Obtain the Euclidean Norm of A
Table 1 demonstrates how to obtain the Euclidean norm of A by syntax-free methods in Maple. The chief tool is the Context Menu system.
Type A, the name of the matrix. Context Menu: Evaluate and Display Inline
Context Menu: Norm_Euclidean
Context Menu: Approximate_10 (digits)
Table 1 Syntax-free calculation of , the Euclidean norm of A
Matrix Norm from First Principles
In Table 2, , the Euclidean norm of A, is obtained via first principles.
For the product , obtain , its Euclidean norm, and a graph of
Write the product of A and U, using a period for noncommutative multiplication; press the Enter key.
Context Menu: Student Multivariate Calculus_Norm
Context Menu: Simplify_Simplify
Context Menu: Plots_Plot Builder (Set .)
Set the derivative of to zero and solve for
Calculus palette: Differentiation operator Reference by its equation label
Context Menu: Student Calculus 1_Solve_Find Roots Complete Roots dialog as per figure to the right.
Context Menu:Select Element_1
Substitute into to obtain
Expression palette: Evaluation template (Reference and by equation label.) Context Menu: Label_Label Reference
Press the Enter key.
Table 2 Calculation of from first principles
Alternate Approaches
An alternate approach treats the calculation of as a constrained optimization problem, where the objective function is and the constraint is the equation . Table 3 uses the Context Menu to implement a numeric optimization based on the Maximize command in the Optimization package.
Write the sequence of objective function and constraint equation, then press the Enter key.
Context Menu: Optimization_Maximize (local)
Table 3 Numeric solution of a constrained optimization problem
The first number in the returned list is the maximum of the objective function, hence, the norm of the matrix A. The second member of that list is a list of equations specifying and .
The symbolic equivalent of the numeric calculation in Table 3 is realized in Table 4 where the Lagrange Multiplier method is implemented. It is surprisingly "messy," especially since there are multiple solutions that have to be sorted out.
Obtain and via the Lagrange Multiplier method
Write the function , where f is the objective function and g is the constraint; press the Enter key.
Calculus palette: Partial-derivative operator (Differentiate with respect to x, y, and ; press the Enter key.)
Context Menu: Solve_Solve (explicit)
Substitute and into to determine
Expression palette: Evaluation template (Evaluate at the third solution and press the Enter key.
Context Menu:_Approximate_10 (digits)
Table 4 Symbolic calculation of by the Lagrange Multiplier method
Legal Notice: © Maplesoft, a division of Waterloo Maple Inc. 2017. Maplesoft and Maple are trademarks of Waterloo Maple Inc. This application may contain errors and Maplesoft is not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact Maplesoft for permission if you wish to use this application in for-profit activities.