Combining Matrices?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Let’s say there are two matrices $A$ and $B$ where
$$A=beginbmatrixa&b\b&aendbmatrix$$
$$B=beginbmatrixc&d\d&cendbmatrix$$
$A$ and $B$ together make up a third matrix $C$ where
$$C=beginbmatrixA&B\B&Aendbmatrix=beginbmatrixbeginbmatrixa&b\b&aendbmatrix&beginbmatrixc&d\d&cendbmatrix\beginbmatrixc&d\d&cendbmatrix&beginbmatrixa&b\b&aendbmatrixendbmatrix$$
My question is of syntax. Specifically, did I define $C$ using $A$ and $B$ properly? It seems ambiguous to me in the sense of $C$ being a matrix of matrices and not of $A$ and $B$ ‘s elements; when I in fact want $C$ to be a matrix of the elements and not of the matrices.
Edit: it looks like I have described a block matrix.
matrices
 |Â
show 4 more comments
up vote
2
down vote
favorite
Let’s say there are two matrices $A$ and $B$ where
$$A=beginbmatrixa&b\b&aendbmatrix$$
$$B=beginbmatrixc&d\d&cendbmatrix$$
$A$ and $B$ together make up a third matrix $C$ where
$$C=beginbmatrixA&B\B&Aendbmatrix=beginbmatrixbeginbmatrixa&b\b&aendbmatrix&beginbmatrixc&d\d&cendbmatrix\beginbmatrixc&d\d&cendbmatrix&beginbmatrixa&b\b&aendbmatrixendbmatrix$$
My question is of syntax. Specifically, did I define $C$ using $A$ and $B$ properly? It seems ambiguous to me in the sense of $C$ being a matrix of matrices and not of $A$ and $B$ ‘s elements; when I in fact want $C$ to be a matrix of the elements and not of the matrices.
Edit: it looks like I have described a block matrix.
matrices
I'm confused. Do you mean for $A$ and $B$ to be $2 times 2$ matrices?
– Clarinetist
Aug 2 at 15:08
1
I think that you're looking forbeginpmatrixa & b \ b & aendpmatrix
.
– md2perpe
Aug 2 at 15:10
Is it now right like this?
– mrtaurho
Aug 2 at 15:13
@mrtaurho the formatting is correct now, except on the rightmost side of $C=$ shows C as a matrix of matrices when I’m trying to make a flat array.
– UpTide
Aug 2 at 15:30
So really, the crux of the question is this: is a matrix of matrices the same as a matrix whose components are the same of the submatrices contained within, and why?
– Clarinetist
Aug 2 at 15:31
 |Â
show 4 more comments
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Let’s say there are two matrices $A$ and $B$ where
$$A=beginbmatrixa&b\b&aendbmatrix$$
$$B=beginbmatrixc&d\d&cendbmatrix$$
$A$ and $B$ together make up a third matrix $C$ where
$$C=beginbmatrixA&B\B&Aendbmatrix=beginbmatrixbeginbmatrixa&b\b&aendbmatrix&beginbmatrixc&d\d&cendbmatrix\beginbmatrixc&d\d&cendbmatrix&beginbmatrixa&b\b&aendbmatrixendbmatrix$$
My question is of syntax. Specifically, did I define $C$ using $A$ and $B$ properly? It seems ambiguous to me in the sense of $C$ being a matrix of matrices and not of $A$ and $B$ ‘s elements; when I in fact want $C$ to be a matrix of the elements and not of the matrices.
Edit: it looks like I have described a block matrix.
matrices
Let’s say there are two matrices $A$ and $B$ where
$$A=beginbmatrixa&b\b&aendbmatrix$$
$$B=beginbmatrixc&d\d&cendbmatrix$$
$A$ and $B$ together make up a third matrix $C$ where
$$C=beginbmatrixA&B\B&Aendbmatrix=beginbmatrixbeginbmatrixa&b\b&aendbmatrix&beginbmatrixc&d\d&cendbmatrix\beginbmatrixc&d\d&cendbmatrix&beginbmatrixa&b\b&aendbmatrixendbmatrix$$
My question is of syntax. Specifically, did I define $C$ using $A$ and $B$ properly? It seems ambiguous to me in the sense of $C$ being a matrix of matrices and not of $A$ and $B$ ‘s elements; when I in fact want $C$ to be a matrix of the elements and not of the matrices.
Edit: it looks like I have described a block matrix.
matrices
edited Aug 2 at 16:35
asked Aug 2 at 15:00
UpTide
135
135
I'm confused. Do you mean for $A$ and $B$ to be $2 times 2$ matrices?
– Clarinetist
Aug 2 at 15:08
1
I think that you're looking forbeginpmatrixa & b \ b & aendpmatrix
.
– md2perpe
Aug 2 at 15:10
Is it now right like this?
– mrtaurho
Aug 2 at 15:13
@mrtaurho the formatting is correct now, except on the rightmost side of $C=$ shows C as a matrix of matrices when I’m trying to make a flat array.
– UpTide
Aug 2 at 15:30
So really, the crux of the question is this: is a matrix of matrices the same as a matrix whose components are the same of the submatrices contained within, and why?
– Clarinetist
Aug 2 at 15:31
 |Â
show 4 more comments
I'm confused. Do you mean for $A$ and $B$ to be $2 times 2$ matrices?
– Clarinetist
Aug 2 at 15:08
1
I think that you're looking forbeginpmatrixa & b \ b & aendpmatrix
.
– md2perpe
Aug 2 at 15:10
Is it now right like this?
– mrtaurho
Aug 2 at 15:13
@mrtaurho the formatting is correct now, except on the rightmost side of $C=$ shows C as a matrix of matrices when I’m trying to make a flat array.
– UpTide
Aug 2 at 15:30
So really, the crux of the question is this: is a matrix of matrices the same as a matrix whose components are the same of the submatrices contained within, and why?
– Clarinetist
Aug 2 at 15:31
I'm confused. Do you mean for $A$ and $B$ to be $2 times 2$ matrices?
– Clarinetist
Aug 2 at 15:08
I'm confused. Do you mean for $A$ and $B$ to be $2 times 2$ matrices?
– Clarinetist
Aug 2 at 15:08
1
1
I think that you're looking for
beginpmatrixa & b \ b & aendpmatrix
.– md2perpe
Aug 2 at 15:10
I think that you're looking for
beginpmatrixa & b \ b & aendpmatrix
.– md2perpe
Aug 2 at 15:10
Is it now right like this?
– mrtaurho
Aug 2 at 15:13
Is it now right like this?
– mrtaurho
Aug 2 at 15:13
@mrtaurho the formatting is correct now, except on the rightmost side of $C=$ shows C as a matrix of matrices when I’m trying to make a flat array.
– UpTide
Aug 2 at 15:30
@mrtaurho the formatting is correct now, except on the rightmost side of $C=$ shows C as a matrix of matrices when I’m trying to make a flat array.
– UpTide
Aug 2 at 15:30
So really, the crux of the question is this: is a matrix of matrices the same as a matrix whose components are the same of the submatrices contained within, and why?
– Clarinetist
Aug 2 at 15:31
So really, the crux of the question is this: is a matrix of matrices the same as a matrix whose components are the same of the submatrices contained within, and why?
– Clarinetist
Aug 2 at 15:31
 |Â
show 4 more comments
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Let $R$ be a ring.
Let $M=mathcal M_2times 2(R)$ be the ring of $2times 2$ matrices over $R$.
Let $A,B$ be in $M$. Then we can associate and write both follwing matrices. (The person writing the matrices has to give the one or the other sense.)
The matrix $$beginbmatrixA & B \ B & Aendbmatrixinmathcal M_2times 2(M) .$$
The block matrix $$left[beginarraycA & B \hline B & Aendarrayright]inmathcal M_4times 4(R) .$$
(There are obvious ring homomorphisms between the two spaces of matrices. Using this, the "multiplication of block matrices" is possible.)
Later edit:
I decided to insert some explicit examples after the discussion in the comments. In my oppinion, the usage of block matrix multiplication is underestimated, it should be a standard tool in the school. Here, to have an easy game of inserting examples, i will use sage. Here is my dialog with sage.
sage: A = matrix( ZZ, 2, 2, [1,5,4,7] )
sage: B = matrix( ZZ, 2, 2, [1,8,4,9] )
sage: C = matrix( ZZ, 2, 2, [0,1,8,2] )
sage: D = matrix( ZZ, 2, 2, [0,7,7,2] )
sage: M = block_matrix( 2, 2, [A,B,C,D] )
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: A, B, C, D
(
[1 5] [1 8] [0 1] [0 7]
[4 7], [4 9], [8 2], [7 2]
)
Now to the above $2times 2$ block matrix named $M$ we associate a plain matrix named $X$.
sage: X = M.matrix_from_rows_and_columns( [0,1,2,3], [0,1,2,3] )
sage: X
[1 5 1 8]
[4 7 4 9]
[0 1 0 7]
[8 2 7 2]
The question in the comment has now the following answer.
The $(1,1)$ entry in $M$ is the $2times 2$ matrix $A$.
The $(1,2)$ entry in $M$ is the $2times 2$ matrix $B$.
The $(1,1)$ entry in $X$ is the number $1$.
The $(1,2)$ entry in $X$ is the number $5$.
We want now to see the utility of block matrices. For this note that we can multiply the blocks "as if" they were numbers. (Well, here, they are indeed "numbers" in a ring, the ring of $2times 2$ matrices over $Bbb Z$. But also more general patterns of block matrices are allowed / make sense. Let us understand but the present situation.)
We have formally
$$M =
left[beginarraycA & B \hline C & Dendarrayright]inmathcal M_2times 2 .$$
Then we can for instance compute
$$
M^2 =
left[beginarraycA & B \hline C & Dendarrayright]
left[beginarraycA & B \hline C & Dendarrayright]
=
left[beginarraycAA+BC & AC+BD \hline CA+DC & CB+DDendarrayright]
.
$$
In our example:
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: M^2
[ 85 57 77 76]
[104 91 95 141]
[ 60 21 53 23]
[ 32 65 30 135]
sage: A*A + B*C, A*C + B*D
(
[ 85 57] [ 96 34]
[104 91], [119 64]
)
sage: C*A + D*C, C*B + D*D
(
[60 21] [ 53 23]
[32 65], [ 30 135]
)
sage:
Sage has a rather mathematically oriented thinking, so i hope the above can be easily digested.
So for the matrix, not block, would $n$ in $M_n$ be equal to 4? If it isn’t then why not? For the block matrix is $M_n$’s $n$ equal to 4? If it isn’t why not?
– UpTide
Aug 3 at 13:03
@UpTide A "block matrix" is a special kind of matrix, it comes with the information of its entries and the information of two partitions, one for the rows, one for the columns, the two partitions determine the blocks of the "block matrix". (A "block" does not make sense alone. So it is hard to understand the question in the above comment "So for the matrix, not block, would $n$ in $M_n$ be equal to 4?" There are no $n$, $M_n$ defined in the context.) For the question "If it isn’t then why not?" i could not find a suitable comment.
– dan_fulea
Aug 3 at 16:52
I think I would understand better with an example. If we say that your matrix $A$ can only contain $0$ as an element, and we say matrix $B$ can only contain $1$ as an element; then we reference the element $M_1,1$, what will the element be equal to? $0$ or $1$? Can we reference element $M_3,3$? What would it be? I'm not trying to be dense, I just truly don't understand.
– UpTide
Aug 4 at 1:00
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Let $R$ be a ring.
Let $M=mathcal M_2times 2(R)$ be the ring of $2times 2$ matrices over $R$.
Let $A,B$ be in $M$. Then we can associate and write both follwing matrices. (The person writing the matrices has to give the one or the other sense.)
The matrix $$beginbmatrixA & B \ B & Aendbmatrixinmathcal M_2times 2(M) .$$
The block matrix $$left[beginarraycA & B \hline B & Aendarrayright]inmathcal M_4times 4(R) .$$
(There are obvious ring homomorphisms between the two spaces of matrices. Using this, the "multiplication of block matrices" is possible.)
Later edit:
I decided to insert some explicit examples after the discussion in the comments. In my oppinion, the usage of block matrix multiplication is underestimated, it should be a standard tool in the school. Here, to have an easy game of inserting examples, i will use sage. Here is my dialog with sage.
sage: A = matrix( ZZ, 2, 2, [1,5,4,7] )
sage: B = matrix( ZZ, 2, 2, [1,8,4,9] )
sage: C = matrix( ZZ, 2, 2, [0,1,8,2] )
sage: D = matrix( ZZ, 2, 2, [0,7,7,2] )
sage: M = block_matrix( 2, 2, [A,B,C,D] )
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: A, B, C, D
(
[1 5] [1 8] [0 1] [0 7]
[4 7], [4 9], [8 2], [7 2]
)
Now to the above $2times 2$ block matrix named $M$ we associate a plain matrix named $X$.
sage: X = M.matrix_from_rows_and_columns( [0,1,2,3], [0,1,2,3] )
sage: X
[1 5 1 8]
[4 7 4 9]
[0 1 0 7]
[8 2 7 2]
The question in the comment has now the following answer.
The $(1,1)$ entry in $M$ is the $2times 2$ matrix $A$.
The $(1,2)$ entry in $M$ is the $2times 2$ matrix $B$.
The $(1,1)$ entry in $X$ is the number $1$.
The $(1,2)$ entry in $X$ is the number $5$.
We want now to see the utility of block matrices. For this note that we can multiply the blocks "as if" they were numbers. (Well, here, they are indeed "numbers" in a ring, the ring of $2times 2$ matrices over $Bbb Z$. But also more general patterns of block matrices are allowed / make sense. Let us understand but the present situation.)
We have formally
$$M =
left[beginarraycA & B \hline C & Dendarrayright]inmathcal M_2times 2 .$$
Then we can for instance compute
$$
M^2 =
left[beginarraycA & B \hline C & Dendarrayright]
left[beginarraycA & B \hline C & Dendarrayright]
=
left[beginarraycAA+BC & AC+BD \hline CA+DC & CB+DDendarrayright]
.
$$
In our example:
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: M^2
[ 85 57 77 76]
[104 91 95 141]
[ 60 21 53 23]
[ 32 65 30 135]
sage: A*A + B*C, A*C + B*D
(
[ 85 57] [ 96 34]
[104 91], [119 64]
)
sage: C*A + D*C, C*B + D*D
(
[60 21] [ 53 23]
[32 65], [ 30 135]
)
sage:
Sage has a rather mathematically oriented thinking, so i hope the above can be easily digested.
So for the matrix, not block, would $n$ in $M_n$ be equal to 4? If it isn’t then why not? For the block matrix is $M_n$’s $n$ equal to 4? If it isn’t why not?
– UpTide
Aug 3 at 13:03
@UpTide A "block matrix" is a special kind of matrix, it comes with the information of its entries and the information of two partitions, one for the rows, one for the columns, the two partitions determine the blocks of the "block matrix". (A "block" does not make sense alone. So it is hard to understand the question in the above comment "So for the matrix, not block, would $n$ in $M_n$ be equal to 4?" There are no $n$, $M_n$ defined in the context.) For the question "If it isn’t then why not?" i could not find a suitable comment.
– dan_fulea
Aug 3 at 16:52
I think I would understand better with an example. If we say that your matrix $A$ can only contain $0$ as an element, and we say matrix $B$ can only contain $1$ as an element; then we reference the element $M_1,1$, what will the element be equal to? $0$ or $1$? Can we reference element $M_3,3$? What would it be? I'm not trying to be dense, I just truly don't understand.
– UpTide
Aug 4 at 1:00
add a comment |Â
up vote
2
down vote
accepted
Let $R$ be a ring.
Let $M=mathcal M_2times 2(R)$ be the ring of $2times 2$ matrices over $R$.
Let $A,B$ be in $M$. Then we can associate and write both follwing matrices. (The person writing the matrices has to give the one or the other sense.)
The matrix $$beginbmatrixA & B \ B & Aendbmatrixinmathcal M_2times 2(M) .$$
The block matrix $$left[beginarraycA & B \hline B & Aendarrayright]inmathcal M_4times 4(R) .$$
(There are obvious ring homomorphisms between the two spaces of matrices. Using this, the "multiplication of block matrices" is possible.)
Later edit:
I decided to insert some explicit examples after the discussion in the comments. In my oppinion, the usage of block matrix multiplication is underestimated, it should be a standard tool in the school. Here, to have an easy game of inserting examples, i will use sage. Here is my dialog with sage.
sage: A = matrix( ZZ, 2, 2, [1,5,4,7] )
sage: B = matrix( ZZ, 2, 2, [1,8,4,9] )
sage: C = matrix( ZZ, 2, 2, [0,1,8,2] )
sage: D = matrix( ZZ, 2, 2, [0,7,7,2] )
sage: M = block_matrix( 2, 2, [A,B,C,D] )
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: A, B, C, D
(
[1 5] [1 8] [0 1] [0 7]
[4 7], [4 9], [8 2], [7 2]
)
Now to the above $2times 2$ block matrix named $M$ we associate a plain matrix named $X$.
sage: X = M.matrix_from_rows_and_columns( [0,1,2,3], [0,1,2,3] )
sage: X
[1 5 1 8]
[4 7 4 9]
[0 1 0 7]
[8 2 7 2]
The question in the comment has now the following answer.
The $(1,1)$ entry in $M$ is the $2times 2$ matrix $A$.
The $(1,2)$ entry in $M$ is the $2times 2$ matrix $B$.
The $(1,1)$ entry in $X$ is the number $1$.
The $(1,2)$ entry in $X$ is the number $5$.
We want now to see the utility of block matrices. For this note that we can multiply the blocks "as if" they were numbers. (Well, here, they are indeed "numbers" in a ring, the ring of $2times 2$ matrices over $Bbb Z$. But also more general patterns of block matrices are allowed / make sense. Let us understand but the present situation.)
We have formally
$$M =
left[beginarraycA & B \hline C & Dendarrayright]inmathcal M_2times 2 .$$
Then we can for instance compute
$$
M^2 =
left[beginarraycA & B \hline C & Dendarrayright]
left[beginarraycA & B \hline C & Dendarrayright]
=
left[beginarraycAA+BC & AC+BD \hline CA+DC & CB+DDendarrayright]
.
$$
In our example:
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: M^2
[ 85 57 77 76]
[104 91 95 141]
[ 60 21 53 23]
[ 32 65 30 135]
sage: A*A + B*C, A*C + B*D
(
[ 85 57] [ 96 34]
[104 91], [119 64]
)
sage: C*A + D*C, C*B + D*D
(
[60 21] [ 53 23]
[32 65], [ 30 135]
)
sage:
Sage has a rather mathematically oriented thinking, so i hope the above can be easily digested.
So for the matrix, not block, would $n$ in $M_n$ be equal to 4? If it isn’t then why not? For the block matrix is $M_n$’s $n$ equal to 4? If it isn’t why not?
– UpTide
Aug 3 at 13:03
@UpTide A "block matrix" is a special kind of matrix, it comes with the information of its entries and the information of two partitions, one for the rows, one for the columns, the two partitions determine the blocks of the "block matrix". (A "block" does not make sense alone. So it is hard to understand the question in the above comment "So for the matrix, not block, would $n$ in $M_n$ be equal to 4?" There are no $n$, $M_n$ defined in the context.) For the question "If it isn’t then why not?" i could not find a suitable comment.
– dan_fulea
Aug 3 at 16:52
I think I would understand better with an example. If we say that your matrix $A$ can only contain $0$ as an element, and we say matrix $B$ can only contain $1$ as an element; then we reference the element $M_1,1$, what will the element be equal to? $0$ or $1$? Can we reference element $M_3,3$? What would it be? I'm not trying to be dense, I just truly don't understand.
– UpTide
Aug 4 at 1:00
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Let $R$ be a ring.
Let $M=mathcal M_2times 2(R)$ be the ring of $2times 2$ matrices over $R$.
Let $A,B$ be in $M$. Then we can associate and write both follwing matrices. (The person writing the matrices has to give the one or the other sense.)
The matrix $$beginbmatrixA & B \ B & Aendbmatrixinmathcal M_2times 2(M) .$$
The block matrix $$left[beginarraycA & B \hline B & Aendarrayright]inmathcal M_4times 4(R) .$$
(There are obvious ring homomorphisms between the two spaces of matrices. Using this, the "multiplication of block matrices" is possible.)
Later edit:
I decided to insert some explicit examples after the discussion in the comments. In my oppinion, the usage of block matrix multiplication is underestimated, it should be a standard tool in the school. Here, to have an easy game of inserting examples, i will use sage. Here is my dialog with sage.
sage: A = matrix( ZZ, 2, 2, [1,5,4,7] )
sage: B = matrix( ZZ, 2, 2, [1,8,4,9] )
sage: C = matrix( ZZ, 2, 2, [0,1,8,2] )
sage: D = matrix( ZZ, 2, 2, [0,7,7,2] )
sage: M = block_matrix( 2, 2, [A,B,C,D] )
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: A, B, C, D
(
[1 5] [1 8] [0 1] [0 7]
[4 7], [4 9], [8 2], [7 2]
)
Now to the above $2times 2$ block matrix named $M$ we associate a plain matrix named $X$.
sage: X = M.matrix_from_rows_and_columns( [0,1,2,3], [0,1,2,3] )
sage: X
[1 5 1 8]
[4 7 4 9]
[0 1 0 7]
[8 2 7 2]
The question in the comment has now the following answer.
The $(1,1)$ entry in $M$ is the $2times 2$ matrix $A$.
The $(1,2)$ entry in $M$ is the $2times 2$ matrix $B$.
The $(1,1)$ entry in $X$ is the number $1$.
The $(1,2)$ entry in $X$ is the number $5$.
We want now to see the utility of block matrices. For this note that we can multiply the blocks "as if" they were numbers. (Well, here, they are indeed "numbers" in a ring, the ring of $2times 2$ matrices over $Bbb Z$. But also more general patterns of block matrices are allowed / make sense. Let us understand but the present situation.)
We have formally
$$M =
left[beginarraycA & B \hline C & Dendarrayright]inmathcal M_2times 2 .$$
Then we can for instance compute
$$
M^2 =
left[beginarraycA & B \hline C & Dendarrayright]
left[beginarraycA & B \hline C & Dendarrayright]
=
left[beginarraycAA+BC & AC+BD \hline CA+DC & CB+DDendarrayright]
.
$$
In our example:
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: M^2
[ 85 57 77 76]
[104 91 95 141]
[ 60 21 53 23]
[ 32 65 30 135]
sage: A*A + B*C, A*C + B*D
(
[ 85 57] [ 96 34]
[104 91], [119 64]
)
sage: C*A + D*C, C*B + D*D
(
[60 21] [ 53 23]
[32 65], [ 30 135]
)
sage:
Sage has a rather mathematically oriented thinking, so i hope the above can be easily digested.
Let $R$ be a ring.
Let $M=mathcal M_2times 2(R)$ be the ring of $2times 2$ matrices over $R$.
Let $A,B$ be in $M$. Then we can associate and write both follwing matrices. (The person writing the matrices has to give the one or the other sense.)
The matrix $$beginbmatrixA & B \ B & Aendbmatrixinmathcal M_2times 2(M) .$$
The block matrix $$left[beginarraycA & B \hline B & Aendarrayright]inmathcal M_4times 4(R) .$$
(There are obvious ring homomorphisms between the two spaces of matrices. Using this, the "multiplication of block matrices" is possible.)
Later edit:
I decided to insert some explicit examples after the discussion in the comments. In my oppinion, the usage of block matrix multiplication is underestimated, it should be a standard tool in the school. Here, to have an easy game of inserting examples, i will use sage. Here is my dialog with sage.
sage: A = matrix( ZZ, 2, 2, [1,5,4,7] )
sage: B = matrix( ZZ, 2, 2, [1,8,4,9] )
sage: C = matrix( ZZ, 2, 2, [0,1,8,2] )
sage: D = matrix( ZZ, 2, 2, [0,7,7,2] )
sage: M = block_matrix( 2, 2, [A,B,C,D] )
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: A, B, C, D
(
[1 5] [1 8] [0 1] [0 7]
[4 7], [4 9], [8 2], [7 2]
)
Now to the above $2times 2$ block matrix named $M$ we associate a plain matrix named $X$.
sage: X = M.matrix_from_rows_and_columns( [0,1,2,3], [0,1,2,3] )
sage: X
[1 5 1 8]
[4 7 4 9]
[0 1 0 7]
[8 2 7 2]
The question in the comment has now the following answer.
The $(1,1)$ entry in $M$ is the $2times 2$ matrix $A$.
The $(1,2)$ entry in $M$ is the $2times 2$ matrix $B$.
The $(1,1)$ entry in $X$ is the number $1$.
The $(1,2)$ entry in $X$ is the number $5$.
We want now to see the utility of block matrices. For this note that we can multiply the blocks "as if" they were numbers. (Well, here, they are indeed "numbers" in a ring, the ring of $2times 2$ matrices over $Bbb Z$. But also more general patterns of block matrices are allowed / make sense. Let us understand but the present situation.)
We have formally
$$M =
left[beginarraycA & B \hline C & Dendarrayright]inmathcal M_2times 2 .$$
Then we can for instance compute
$$
M^2 =
left[beginarraycA & B \hline C & Dendarrayright]
left[beginarraycA & B \hline C & Dendarrayright]
=
left[beginarraycAA+BC & AC+BD \hline CA+DC & CB+DDendarrayright]
.
$$
In our example:
sage: M
[1 5|1 8]
[4 7|4 9]
[---+---]
[0 1|0 7]
[8 2|7 2]
sage: M^2
[ 85 57 77 76]
[104 91 95 141]
[ 60 21 53 23]
[ 32 65 30 135]
sage: A*A + B*C, A*C + B*D
(
[ 85 57] [ 96 34]
[104 91], [119 64]
)
sage: C*A + D*C, C*B + D*D
(
[60 21] [ 53 23]
[32 65], [ 30 135]
)
sage:
Sage has a rather mathematically oriented thinking, so i hope the above can be easily digested.
edited Aug 4 at 2:07
answered Aug 2 at 16:39
dan_fulea
4,0021211
4,0021211
So for the matrix, not block, would $n$ in $M_n$ be equal to 4? If it isn’t then why not? For the block matrix is $M_n$’s $n$ equal to 4? If it isn’t why not?
– UpTide
Aug 3 at 13:03
@UpTide A "block matrix" is a special kind of matrix, it comes with the information of its entries and the information of two partitions, one for the rows, one for the columns, the two partitions determine the blocks of the "block matrix". (A "block" does not make sense alone. So it is hard to understand the question in the above comment "So for the matrix, not block, would $n$ in $M_n$ be equal to 4?" There are no $n$, $M_n$ defined in the context.) For the question "If it isn’t then why not?" i could not find a suitable comment.
– dan_fulea
Aug 3 at 16:52
I think I would understand better with an example. If we say that your matrix $A$ can only contain $0$ as an element, and we say matrix $B$ can only contain $1$ as an element; then we reference the element $M_1,1$, what will the element be equal to? $0$ or $1$? Can we reference element $M_3,3$? What would it be? I'm not trying to be dense, I just truly don't understand.
– UpTide
Aug 4 at 1:00
add a comment |Â
So for the matrix, not block, would $n$ in $M_n$ be equal to 4? If it isn’t then why not? For the block matrix is $M_n$’s $n$ equal to 4? If it isn’t why not?
– UpTide
Aug 3 at 13:03
@UpTide A "block matrix" is a special kind of matrix, it comes with the information of its entries and the information of two partitions, one for the rows, one for the columns, the two partitions determine the blocks of the "block matrix". (A "block" does not make sense alone. So it is hard to understand the question in the above comment "So for the matrix, not block, would $n$ in $M_n$ be equal to 4?" There are no $n$, $M_n$ defined in the context.) For the question "If it isn’t then why not?" i could not find a suitable comment.
– dan_fulea
Aug 3 at 16:52
I think I would understand better with an example. If we say that your matrix $A$ can only contain $0$ as an element, and we say matrix $B$ can only contain $1$ as an element; then we reference the element $M_1,1$, what will the element be equal to? $0$ or $1$? Can we reference element $M_3,3$? What would it be? I'm not trying to be dense, I just truly don't understand.
– UpTide
Aug 4 at 1:00
So for the matrix, not block, would $n$ in $M_n$ be equal to 4? If it isn’t then why not? For the block matrix is $M_n$’s $n$ equal to 4? If it isn’t why not?
– UpTide
Aug 3 at 13:03
So for the matrix, not block, would $n$ in $M_n$ be equal to 4? If it isn’t then why not? For the block matrix is $M_n$’s $n$ equal to 4? If it isn’t why not?
– UpTide
Aug 3 at 13:03
@UpTide A "block matrix" is a special kind of matrix, it comes with the information of its entries and the information of two partitions, one for the rows, one for the columns, the two partitions determine the blocks of the "block matrix". (A "block" does not make sense alone. So it is hard to understand the question in the above comment "So for the matrix, not block, would $n$ in $M_n$ be equal to 4?" There are no $n$, $M_n$ defined in the context.) For the question "If it isn’t then why not?" i could not find a suitable comment.
– dan_fulea
Aug 3 at 16:52
@UpTide A "block matrix" is a special kind of matrix, it comes with the information of its entries and the information of two partitions, one for the rows, one for the columns, the two partitions determine the blocks of the "block matrix". (A "block" does not make sense alone. So it is hard to understand the question in the above comment "So for the matrix, not block, would $n$ in $M_n$ be equal to 4?" There are no $n$, $M_n$ defined in the context.) For the question "If it isn’t then why not?" i could not find a suitable comment.
– dan_fulea
Aug 3 at 16:52
I think I would understand better with an example. If we say that your matrix $A$ can only contain $0$ as an element, and we say matrix $B$ can only contain $1$ as an element; then we reference the element $M_1,1$, what will the element be equal to? $0$ or $1$? Can we reference element $M_3,3$? What would it be? I'm not trying to be dense, I just truly don't understand.
– UpTide
Aug 4 at 1:00
I think I would understand better with an example. If we say that your matrix $A$ can only contain $0$ as an element, and we say matrix $B$ can only contain $1$ as an element; then we reference the element $M_1,1$, what will the element be equal to? $0$ or $1$? Can we reference element $M_3,3$? What would it be? I'm not trying to be dense, I just truly don't understand.
– UpTide
Aug 4 at 1:00
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870157%2fcombining-matrices%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I'm confused. Do you mean for $A$ and $B$ to be $2 times 2$ matrices?
– Clarinetist
Aug 2 at 15:08
1
I think that you're looking for
beginpmatrixa & b \ b & aendpmatrix
.– md2perpe
Aug 2 at 15:10
Is it now right like this?
– mrtaurho
Aug 2 at 15:13
@mrtaurho the formatting is correct now, except on the rightmost side of $C=$ shows C as a matrix of matrices when I’m trying to make a flat array.
– UpTide
Aug 2 at 15:30
So really, the crux of the question is this: is a matrix of matrices the same as a matrix whose components are the same of the submatrices contained within, and why?
– Clarinetist
Aug 2 at 15:31