![]()
MATH347 L4: More matrix operations
|
New concepts:
Matrix transpose
Block matrices
Block matrix addition, multiplication, transposition
Combined operations:
Addition and multiplication (Matrix distributivity)
Transposition and addition
Transposition and multiplication
![]()
Matrix transpose
|
Definition. Given a matrix ,
the transpose of , denoted as is
Transposition switches row and column vectors
![]()
Matrix transpose examples
|
>> |
A=[1 2 3; 4 5 6; 7 8 9]; disp(A) |
1 2 3
4 5 6
7 8 9
>> |
transpose(A) |
>> |
A' |
>> |
u=[1 2 3]; u' |
![]()
Block matrices
|
is a mtrix with 4 rows and 4 columns
It is useful to recognize common structures in a matrix
![]()
Block matrix addition, multiplication, transposition
|
Matrix block addition
Matrix block multiplication
Matrix block transposition
![]()
Transpose of matrix columns
|
contains column vectors with components each
The transpose switches rows and columns
has rows and columns
![]()
Block operation examples: forming blocks, block assembly
|
>> |
A=[1 2 -1 0; 2 1 0 2; -1 0 1 2; 0 2 2 1]; disp(A) |
1 2 -1 0
2 1 0 2
-1 0 1 2
0 2 2 1
>> |
B=A(1:2,1:2); C=A(1:2,3:4); [B C; C B] |
>> |
D=[1 -1 1 0; -1 1 0 1; 1 0 1 -1; 0 1 -1 1]; |
>> |
E=D(1:2,1:2); F=D(1:2,3:4); [D [E F; F E]] |
![]()
Block operation examples: addition
|
>> |
A+D |
>> |
[B C; C B] + [E F; F E] |
>> |
[B+E C+F; C+F B+E] |
![]()
Block operation examples: multiplication
|
>> |
A*D |
>> |
[B*E+C*F B*F+C*E; C*E+B*F C*F+B*E] |
>> |
![]()
Block operation examples: transposition
|
>> |
M=[1 2 3 4; 5 6 7 8; -1 -2 -3 -4; -5 -6 -7 -8]; disp([M M']) |
1 2 3 4 1 5 -1 -5
5 6 7 8 2 6 -2 -6
-1 -2 -3 -4 3 7 -3 -7
-5 -6 -7 -8 4 8 -4 -8
>> |
U=M(1:2,1:2); V=M(1:2,3:4); X=M(3:4,1:2); Y=M(3:4,3:4); |
>> |
[U' X'; V' Y'] |
>> |
![]()
Combined operations
|
Distributivity
Transposition of sum
Transposition of scaling ,
Transposition of product: Start by matrix-vector product for
Transposition of product