Question

In: Computer Science

Why matrix can be multiplied by itself if and only if it is a square matrix?

Why matrix can be multiplied by itself if and only if it is a square matrix?

Solutions

Expert Solution

The solution to the above program is:-

A matrix is said to be a square matrix if the number of rows is equal to the number of columns.

Matrix multiplication means multiplying each row of 1 st matrix with each column of the 2nd matrix. that is A=[[1,2],[3,4]]

and B=[[4,5],[8,6]] then A*B = [[1*4+2*8,1*5+2*8],[3*4+4*8,3*5+4*6]]. Here each row element is multiplied with corresponding column element in the 2nd matrix. This is the reason if two matrices can't be multiplied if the number of columns of the first matrix is not equal to the number of rows of the second matrix.

consider a 2-dimensional matrix with rows =3 and columns=2

ex:-

A=[[1 2 3],[4 5 6]]

matrix multiplication is possible if and only the number of columns of the 1st matrix is equal to the number of rows of the second matrix.

consider A=(2,3) -------> here writing only the dimensions, not the actual elements.

B=(3,2) --->here matrix has 3 rows and w columns .

A* B ------> multiplying two matrices A and B.

Then the resultant product will be of the dimensions. (2,2) That is it is having 2 rows and 2 columns.

Multiplication of two matrices is not possible if the number of columns of the 1st matrix is not equal to the number of rows of the 2nd matrix.

A=(2,3) and B=(2,3) Here matrix multiplication will not be possible.

A square matrix can be multiplied by itself as the required criteria are satisfied.

A=(2,2) ---> dimensions 2 rows and 2 columns.

A * A =(2,2) X (2,2) ------> number of columns of the 2nd matrix is equal to the number of rows of the second matrix.

That is why a square matrix can be multiplied by itself.

Another example:-

A=(2,3) ----> 2 rows and 3 columns. dimensions of the matrix.

A * A ----> (2,3)X(2,3) ---------> Number of columns of 1 st matrix is not equal to the number of rows of 2nd matrix.

So a normal matrix can't be multiplied by itself.

Thank you.


Related Solutions

A number is prime if it can be divided exactly only by 1 and itself. Here...
A number is prime if it can be divided exactly only by 1 and itself. Here is an algorithm for checking if an input number is prime: function out = isprime(m)             for j:=2 to m-1             if mod(m,j) ==0 then             return “input is not a prime”             endif             endfor             return ”input is a prime” Let n denote the size of the input m, i.e. the number of bits in the binary expression for m. What is...
Assignment: Square Matrix ("Caesar Block")Cipher C++ ASSIGNMENTS *REMEMBER IT SHOULD NOT ONLY READ ONE LINE OR...
Assignment: Square Matrix ("Caesar Block")Cipher C++ ASSIGNMENTS *REMEMBER IT SHOULD NOT ONLY READ ONE LINE OR A SINGLE WORD remember, read, understand, and use the waterpump.cpp program will process an arbitrary amount of input text, however long. Arrange a stream in a two dimensional array of characters by filling up the array a line at a time, from leftmost column to rightmost column. DO NOT USE A GETLINE: this program should be able to input an entire library, not a...
A square matrix A is said to be symmetric if its transpose AT satisfies AT= A,...
A square matrix A is said to be symmetric if its transpose AT satisfies AT= A, and a complex-valued square matrix A is said to be Hermitian if its conjugate transpose AH = (A)T = AT satisfies AH = A. Thus, a real-valued square matrix A is symmetric if and only if it is Hermitian. Which of the following is a vector space? (a) The set of all n xn real-valued symmetric matrices over R. (b) The set of all...
a. Let A be a square matrix with integer entries. Prove that if lambda is a...
a. Let A be a square matrix with integer entries. Prove that if lambda is a rational eigenvalue of A then in fact lambda is an integer. b. Prove that the characteristic polynomial of the companion matrix of a monic polynomial f(t) equals f(t).
For matrices, a mulitplicative identity is a square matrix X such XA = AX = A...
For matrices, a mulitplicative identity is a square matrix X such XA = AX = A for any square matrix A. Prove that X must be the identity matrix. Prove that for any invertible matrix A, the inverse matrix must be unique. Hint: Assume that there are two inverses and then show that they much in fact be the same matrix. Prove Theorem which shows that Gauss-Jordan Elimination produces the inverse matrix for any invertible matrix A. Your proof cannot...
Theorem. If A is an n by n square matrix, then the following statements are equivalent....
Theorem. If A is an n by n square matrix, then the following statements are equivalent. A is invertible. The system Av=b has at least one solution for every column-vector b. The system Av=b has exactly one solution for every column-vector b The system Av=b has only the trivial solution (0,0,0,...0) ( Homogeneous systems). The reduced row-echelon form of A is the identity matrix. A is a product of elementary matrices. Can you please help me to give some short...
Give an example of a square matrix A such that all the diagonal entries are positive...
Give an example of a square matrix A such that all the diagonal entries are positive but A is not positive definite
Write a Java program to 1. read in the size of a square boolean matrix A...
Write a Java program to 1. read in the size of a square boolean matrix A 2. read in the 0-1 matrix elements 3. read in a positive integer n 4. display A^n
Let b be a vector that has the same height as a square matrix A. How...
Let b be a vector that has the same height as a square matrix A. How many solutions can Ax = b have?
Consider a square matrix A such that Ker(A2 ) = Ker(A3 ). Is Ker(A3 ) =...
Consider a square matrix A such that Ker(A2 ) = Ker(A3 ). Is Ker(A3 ) = Ker(A4 ). Explain your reasoning.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT