Can We Subtract Matrices with Different Dimensions?

  • Thread starter Quarlep
  • Start date
  • Tags
    Matrix
In summary, to remove an element in a matrix, you can use matrix indexing notation and set its value to zero or another desired value. You can also remove a row or column using indexing notation, which will reduce the size of the matrix. It is possible to remove multiple elements at once by using logical operators. After removing an element, the empty space will still be occupied by the original element's index, but you can shift the remaining elements to fill it. Removing an element will always change the size of the matrix, but you can replace it with a placeholder value to maintain the original size.
  • #1
Quarlep
257
4
We have a matrix A4x5 and B2x3 can we remove(-) them A-B

Thanks
 
Physics news on Phys.org
  • #2
That depends upon what you mean by "remove". Normally "-" means "subtract". That is defined only for matrices with the same number of rows and columns.

If you mean [itex]a_{ij}- b_{ij}[/itex], taking [itex]b_{ij}= 0[/itex] if i> 2 and j> 3, you can define that (you can define anything) but it will not obey any of the usual algebraic rules- so probably won't be of much use.
 

1. How do you remove an element in a matrix?

To remove an element in a matrix, you can use the matrix indexing notation to specify the row and column of the element and set its value to zero or any other desired value.

2. Can you remove a row or column in a matrix?

Yes, you can remove a row or column in a matrix by using the indexing notation and specifying the row or column you want to remove. This will effectively reduce the size of the matrix by one row or column.

3. Is it possible to remove multiple elements in a matrix at once?

Yes, it is possible to remove multiple elements in a matrix at once by using a combination of indexing notation and logical operators. This will allow you to specify a condition for removing the elements, such as all elements greater than a certain value.

4. How do you handle the empty space after removing an element in a matrix?

After removing an element in a matrix, the empty space will still be occupied by the original element's index. You can shift the remaining elements to fill in the empty space using a loop or built-in functions such as "reshape".

5. Can you remove an element without changing the size of the matrix?

No, removing an element in a matrix will always result in a change in the size of the matrix. You can, however, replace the removed element with a placeholder value to maintain the original size of the matrix.

Similar threads

  • Linear and Abstract Algebra
Replies
2
Views
608
  • Linear and Abstract Algebra
Replies
8
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
810
  • Linear and Abstract Algebra
Replies
6
Views
523
Replies
7
Views
835
  • Linear and Abstract Algebra
Replies
9
Views
1K
Replies
12
Views
3K
Replies
7
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
601
Replies
24
Views
1K
Back
Top