Question: Write a Python program that preforms certain common vector operations, using Python lists as the 'vectors'. A function that does scalar multiplication. This function should

Write a Python program that preforms certain common vector operations, using Python lists as the 'vectors'. A function that does scalar multiplication. This function should take a list, V and a real number, k, as its arguments, returns a new list in which each element is k times the corresponding element of V.

Background explanation: Write a Python program that preforms certain common vector operations, using Python

Part of this exercise asks you to write a Python function that computes the Lk norm for a vector. If you haven't encountered this term before, the Lk norm of vector v (V1, V2, ..., Un), sometimes written Ulk, is defined as llk = |u1|*+|v2|k+...+|un|k or, in English (which isn't necessarily any more understandable than the symbolic form), the kth root of the sum of the kth powers of the absolute values of the elements of v. Norms are in some sense a measure of the magnitude of a vector. In particular, notice that the La norm is just the usual length of the vector, or the Euclidean distance from its tail to its head. The L norm is the so-called Manhattan distance from the tail to the head, i.e., the distance you would travel going from tail to head if you could only move parallel to the coordinate axes (as if you were driving on city streets parallel to the axes). As a limiting case, the L-infinity norm |loo, is defined to be the maximum absolute value of any element in the vector

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!