help me please ,how to do these tasks?

Note:​ 2D array can be used for matrix operation

Task 1: You are required to write a program to find the transpose of a matrix. The array can be of any size.

You can check if your program is giving right output on following link. http://onlinemschool.com/math/assistance/matrix/transpose/

Task 2: You are required to write a program to find the determinant of 2 by 2 matrix.

You can check if your program is giving right output on following link. http://onlinemschool.com/math/assistance/matrix/determinant/

Task 3: You are required to write a program to perform following equation between two matrix. A =​ A*B

Task 4: You are required to write a program that perform the power of matrix operation. The matrix assume to be 3 by 3 of size. The program should be generic i.e. your program asks from user about how many time he/she want to multiply a matrix. Hint:​ To find third power, implement and same for other powers. A^3 = A*A*A
Last edited on
1) https://www.google.com/search?q=transpose+of+a+matrix.&ie=utf-8&oe=utf-8 - looking at the visual of a transpose, basically the rows are becoming columns and visa versa in a transpose. Use nested for loops here.
Set it up so that B[0][0] = A[0][0], B[0][1] = A[1][0], B[0][2] = A[2][0], B[1][0] = A[0][1] etc.

2) http://www.mathsisfun.com/algebra/matrix-determinant.html - The determinate of a 2X2 matrix is found by multiplying the top left by the bottom right then subtracting the bottom left times the top right. (This is a common function in multivariable/vector calculus. Commonly called cross product)

3) I have not dealt with matrix multiplication, but this problem leads into the solution for number 4. Do some googling around. (I also remember running across an explanation of it on youtube specifically because I chose to skip that topic since I didn't need it for school).

Last edited on
Topic archived. No new replies allowed.