Question: Write a function in python 3 which takes a matrix A and a vector x as it's arguments and computes the matrix vector product Ax=b.
Write a function in python 3 which takes a matrix A and a vector x as it's arguments and computes the matrix vector product Ax=b. Your function should be defined as follows:
def matVec(matrix,vector):
You will need to follow the following specifications:
Your code should contain comments explaining what the different parts of your code is doing and all functions in your script should contain a docstring which explains what your function does and how it does it.
Once written, you need to test your function by passing the following inputs
A matrix and a vector (the expected inputs)
A vector and a matrix(I.e. pass a matrix as the vector argument and a vector as the matrix argument)
A string and an integer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
