Question: 4. (25 points) Write a Python program to find the transpose of a matrix (i.e, A'), where the column vectors of AT are the row

 4. (25 points) Write a Python program to find the transpose

4. (25 points) Write a Python program to find the transpose of a matrix (i.e, A'), where the column vectors of AT are the row vectors of the original matrix A. a. Define a function that meets the following specifications: def TransposeMatrix (AMatrix): AMatrix is a matrix of dimension m columns by n rows. Note that nem generally. The function should return two values: At The transpose of AMatrix and a tuple with the ordered pair of (number rows, number cols) of AT. b. Define a function that meets the following specifications: def main(): AM=[ [1, -5, 3, -7], [2, 5, 11, -2], [13, -1, 0, 4]] The main function should call the function TransposeMatrix and output to the screen/console the following formatted output: Transpose of the matrix is: [[1, 2, 13] [-5, 5, -1] [3, 11, 0] [-7, -2, 4]] The size of the transpose is: (4 x 3) Note: Your program should call the function main () when run. We will grade the problem with this exact matrix first and then change the matrix (including its size) to test your program

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!