Sample Solution from
Linear Algebra with Applications (9th Edition) (Featured Titles for Linear Algebra (Introductory))
9th Edition
ISBN: 9780321962218
Chapter 1
Problem 1E
Try another sample solution
Textbook Problem

Use MATLAB to generate random 4 × 4 matrices A and B. For each of the following, compute A1, A2, A3, and A4 as indicated and determine which of the matrices are equal (you can use MATLAB to test whether two matrices are equal by computing their difference).

(a) A 1 = A * B , A 2 = B * A , A 3 = ( A ' * B ' ) ' , A 4 = ( B ' * A ' ) '

(b) A 1 = A ' * B ' , A 2 = ( A * B ) ' , A 3 = B ' * A ' , A 4 = ( B * A ) '

(c) A 1 = inv ( A * B ) , A 2 = inv ( A ) * inv ( B ) , A 3 = inv ( B * A ) , A 4 = inv ( B ) * inv ( A )

(d) A 1 = inv ( ( A * B ) ' ) , A 2 = inv ( A ' * B ' ) , A 3 = inv ( A ' ) * inv ( B ' ) , A 4 = ( inv ( A ) * ( B ) ) '

Expert Solution

a.

To determine

Compute the given relationship using random matrix in MATLAB.

Answer

The solution is

  A1=A×B=[ 2.5996    2.2639    2.1191    1.3488 1.7015    1.8701    1.5961    1.3071  1.2013    0.9745    0.7282    0.2677 1.7911    1.5751    1.8113    1.3821]

  A2=B×A=[ 1.6225    0.8782    1.7797    1.3582 1.0310    0.8872    1.1969    1.5245  2.1538    1.1769    2.3803    1.8653 1.7066    0.8245    1.9126    1.6901]

  A3=(A'×B')'=[ 1.6225    0.8782    1.7797    1.3582 1.0310    0.8872    1.1969    1.5245  2.1538    1.1769    2.3803    1.8653 1.7066    0.8245    1.9126    1.6901]

  A4=(B'×A')'=[ 2.5996    2.2639    2.1191    1.3488 1.7015    1.8701    1.5961    1.3071 1.2013    0.9745    0.7282    0.2677  1.7911    1.5751    1.8113    1.3821]

Explanation of Solution

Given:The matrix has been given

  A=rand(4)B=rand(4)

Concept Used:

Given,

  A=rand(4)B=rand(4)

Calculate the given relationship in MATLAB.

Program:

clc
clear
close all
A=rand(4);
B=rand(4);
A1=A*B
A2=B*A
A3=(A'*B')'
A4=(B'*A')'
A4-A1
A3-A2

Quarry:

  • First, we will define the random matrix A and B.
  • Calculate the given relationship.
  • Show the difference between two matrices.
Expert Solution

b.

To determine

Compute the given relationship using random matrix in MATLAB.

Answer

The solution is

  A1=A'×B'=[  0.9385    0.4596    0.5554    0.8086  1.6385    0.9082    0.8031    0.8671   1.8933    0.8566    1.0169    1.2156  1.3666    0.5372    0.6977    0.9226]

  A2=(A×B)'=[ 0.9689    0.7103    1.3002    1.2689 0.4397    0.3713    0.5313    0.9618  0.8009    0.4852    0.9644    1.4121 0.7379    0.6510    1.0142    1.4816]

  A3=B'×A'=[ 0.9689    0.7103    1.3002    1.2689 0.4397    0.3713    0.5313    0.9618  0.8009    0.4852    0.9644    1.4121 0.7379    0.6510    1.0142    1.4816]

  A4=(B×A)'=[ 0.9385    0.4596    0.5554    0.8086 1.6385    0.9082    0.8031    0.8671 1.8933    0.8566    1.0169    1.2156  1.3666    0.5372    0.6977    0.9226]

Explanation of Solution

Given:The matrix has been given

  A=rand(4)B=rand(4)

Concept Used:

Given,

  A=rand(4)B=rand(4)

Calculate the given relationship in MATLAB.

Program:

clc
clear
close all
A=rand(4);
B=rand(4);
A1=A'*B'
A2=(A*B)'
A3=B'*A'
A4=(B*A)'
A4-A1
A3-A2

Quarry:

  • First, we will define the random matrix A and B.
  • Calculate the given relationship.
  • Show the difference between two matrices.
Expert Solution

c.

To determine

Compute the given relationship using random matrix in MATLAB.

Answer

The solution is

  A1=inv(A×B)=[   10.8369  -30.8416   32.4916   22.5021   -9.9010   -0.1579    3.0864    9.2304   -7.7213   28.7573  -27.5727  -25.1680    5.7242    6.0655  -11.2386   -8.9117]

  A2=inv(A)×inv(B)=[   -3.0174    3.3756   33.6054   -7.8791  -18.5258   27.1564   44.2122  -35.9855   20.8870  -26.9653  -57.5365   36.2525    1.3366   -3.7610  -14.8918    7.5920]

  A3=inv(B×A)=[   -3.0174    3.3756   33.6054   -7.8791  -18.5258   27.1564   44.2122  -35.9855   20.8870  -26.9653  -57.5365   36.2525    1.3366   -3.7610  -14.8918    7.5920]

  A4=inv(B)×inv(A)=[    10.8369  -30.8416   32.4916   22.5021   -9.9010   -0.1579     3.0864      9.2304   -7.7213   28.7573   -27.5727   -25.1680    5.7242    6.0655    -11.2386   -8.9117]

Explanation of Solution

Given:The matrix has been given

  A=rand(4)B=rand(4)

Concept Used:

Given,

  A=rand(4)B=rand(4)

Calculate the given relationship in MATLAB.

Program:

clc
clear
close all
A=rand(4);
B=rand(4);
A1=inv(A*B)
A2=inv(A)*inv(B)
A3=inv(B*A)
A4=inv(B)*inv(A)
A1-A4
A2-A3

Quarry:

  • First, we will define the random matrix A and B.
  • Calculate the given relationship.
  • Show the difference between two matrices.
Expert Solution

d.

To determine

Compute the given relationship using random matrix in MATLAB.

Answer

The solution is

  A1=inv((A×B)')=[  -19.2699   11.2507   11.1342  -15.2627  -16.7260  -16.1042    0.8038   21.3048   44.3982    4.9491   -19.0348    3.2452   5.6507      4.9232      3.3463   -13.5923]

  A2=inv(A'×B')=[    0.3349  -59.7601    0.3028   19.2572    4.1133  -20.7907    1.7670    0.5741   -7.2267   66.3396   -8.7572   -4.4413    4.1318   62.3865   14.1593  -38.7882]

  A3=inv(A')×inv(B')=[  -19.2699   11.2507   11.1342  -15.2627  -16.7260  -16.1042    0.8038   21.3048   44.3982    4.9491   -19.0348    3.2452    5.6507     4.9232    3.3463    -13.5923]

  A4=(inv(A)×inv(B))'=[ 0.3349  -59.7601    0.3028   19.2572 4.1133  -20.7907    1.7670    0.5741-7.2267   66.3396   -8.7572   -4.4413 4.1318   62.3865   14.1593  -38.7882]

Explanation of Solution

Given:The matrix has been given

  A=rand(4)B=rand(4)

Concept Used:

Given,

  A=rand(4)B=rand(4)

Calculate the given relationship in MATLAB.

Program:

clc
clear
close all
A=rand(4);
B=rand(4);
A1=inv((A*B)')
A2=inv(A'*B')
A3=inv(A')*inv(B')
A4=(inv(A)*inv(B))'
A1-A4
A2-A3

Quarry:

  • First, we will define the random matrix A and B.
  • Calculate the given relationship.
  • Show the difference between two matrices.
Not sold yet?Try another sample solution