Concept explainers
To create:
The variables for these two matrices and perform these operations “A+B”, “A-B” and “A.B”.
Answer to Problem 38E
Solution:
The variables for the given two matrices are “A = [1:1:3; 4 -1 6]”, and “B = [2 4 1; -1 3 0]” and the output of these operations “A+B”, “A-B”, and “A.B” are
Explanation of Solution
The given matrices are,
And,
Substitute
Therefore, the elements of the matrix “A+B” are
Substitute
Therefore, the elements of the matrix “A-B” are
Substitute
The multiplication of the matrix is not possible.
Now, verify the expression output through the MATLAB command.
MATLAB Code:
A = [1:1:3; 4 -1 6]
% Define the command to get the matrix “A”.
B = [2 4 1; -1 3 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”.
A*B
% Define the command to get the output of the expression “A*B”.
Save the MATLAB script with name, chapter2_45251_2_38E.m in the current folder. Execute the program by typing the script name at the command window to create the variables for given two matrices and perform the following operations “A+B”, “A-B” and “A*B”.
Result:
Therefore, the variables for the given two matrices are “A = [1:1:3; 4 -1 6]”, and “B = [2 4 1; -1 3 0]” and the output of these operations “A+B”, “A-B”, and “A.B” are
Want to see more full solutions like this?
Chapter 2 Solutions
Matlab, Fourth Edition: A Practical Introduction to Programming and Problem Solving
- Use elementary matrices to find the inverse of A=100010abc, c0.arrow_forwardSolve for x and y in the matrix equation 2AB=I, given A=[1123] and B=[x2y5].arrow_forwardLet X1,X2,X3 and b be the column matrices below. X1=[101], X2=[110], X3=[011] and b=[123] Find constants a, b, c and c such that aX1+bX2+cX3=barrow_forward
- Elementary Linear Algebra (MindTap Course List)AlgebraISBN:9781305658004Author:Ron LarsonPublisher:Cengage LearningCollege Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningCalculus For The Life SciencesCalculusISBN:9780321964038Author:GREENWELL, Raymond N., RITCHEY, Nathan P., Lial, Margaret L.Publisher:Pearson Addison Wesley,
- College AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningAlgebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningElements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,