Explore BrainMass
Share

Matrices with Matlab

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Given A = [ 2 0 4 B = [ 3 5 2
1 4 -1 0 8 4
3 1 2] 1 0 9]

C = [ 1 D = [ 1 4
2 -2 3]
3]

Respond to the following:
Q21. What is the transpose of A?
Q22. Solve for the determinant of A.
Q23. Calculate the inverse of D.
Q24. What is the product of A x C?
Q25. What is the rank of B?
Q26. Compute the sum of A + B.
Q27. What is the product of 3 x D?
Q28. Calculate the product of C x D.
Q29. Write a set of equations that describe the matrix equation Ax X = C.
Q30. Show that A+B = B+A
Q31. Show that A x B is not equal to B x A.

© BrainMass Inc. brainmass.com October 25, 2018, 7:47 am ad1c9bdddf
https://brainmass.com/math/matrices/matrices-with-matlab-515462

Attachments

Solution Preview

The following is the output from a MATLAB file used to respond.

initialize matrix
A = [2 0 4; 1 4 -1; 3 1 2];
B = [3 5 2; 0 8 4; 1 0 9];
C = [1; 2; 3];
D = [1 4; -2 3];
transpose of A
Q21 = A'

Q21 =

2 1 3
0 4 1
4 -1 2

Determinant of A
Q22 = det(A)

Q22 =

-26

Inverse of D
Q23 = inv(D)

Q23 =

0.2727 -0.3636
0.1818 0.0909

Product of A x C
Q24 = A*C

Q24 =

14
6
11

Rank of B
Q25 = rank(B)

Q25 =

3

Sum of A+B
Q26 = A+B

Q26 =

5 5 6
1 ...

Solution Summary

Performing matrix algebra such as adding and multiplication of matrices.

$2.19
See Also This Related BrainMass Solution

Matlab Matrices and Quadratic Equations

1. Use loops to create a 3 x 5 matrix in which the value of each element is the difference between the indices divided by the sum of its indices (the row number and column number of the element). For example, the value of the element (2,5) is (2-5) / (2+5) = -0.4286

2. Write the program indicated in the problem and use it to solve the following equations:
a) -2x^2 + 16x - 32 = 0
b) 8x^2 + 9x + 3 = 0
c) 3x^2 + 5x - 6 = 0

NOTE: Instead of asking the user to input the coefficients, create a 3x3 matrix containing the data with each row corresponding to a problem. Then use a loop to execute the problem 3 times, using the appropriate row each time.

View Full Posting Details