Concept explainers
To find:
The value of the expressions A.*B, A*B and B*A by hand and then verify the results in MATLAB.
Answer to Problem 2.5P
Solution:
The values of the expressions A.*B, A*B, and B*A are
Explanation of Solution
The given matrices are,
And,
Substitute
Substitute
Similarly substitute
Now, verifying the expression output by using MATLAB command.
MATLAB Code:
A = [1 4;3 3]
% Define the command to get the matrix “A”.
B = [1 2;-1 0]
% Define the command to get the matrix “B”.
A.*B
% Define the command to get the output of the expression “A.*B”.
A*B
% Define the command to get the output of the expression “A*B”.
B*A
% Define the command to get the output of the expression “B*A”.
Save the MATLAB script with name, chapter2_45251_2_5P.m in the current folder. Execute the program by typing the script name at the command window to find the value of the expressions A.*B, A*B and B*A by hand and then verify the results in MATLAB.
Result:
Therefore, the values of the expressions A.*B, A*B, and B*A are
Want to see more full solutions like this?
Chapter 2 Solutions
Matlab Fourth Edition: A Practical Introduction to Programming and Problem Solving
- Are the two matrices similar? If so, find a matrix P such that B=P1AP. A=[100020003]B=[300020001]arrow_forwardIn a previous section, we showed that matrix multiplication is not commutative, that is, ABBA in most cases. Can you explain why matrix multiplication is commutative for matrix inverses, that is, A1A=AA1 ?arrow_forward
- Algebra for College StudentsAlgebraISBN:9781285195780Author:Jerome E. Kaufmann, Karen L. SchwittersPublisher:Cengage LearningCollege Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage Learning
- Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage LearningCollege AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningAlgebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning