Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Name – Naresh kumawat

Roll No. –(1907061)


Experiment no-1

Aim : Matrix Properties (Transpose, Orthogonal matrix, Symmetric


and Skew Symmetric matrix, etc.).

Program :

To Find Multiplication of two matrices :

//Multiplication of matrix_(1907061) _Naresh kumawat


clc
clear
n = input('Enter the no of rows of 1st matrix = ')
m = input('Enter the no of columbs of ist matrix = ')
for i=1:n
for j=1:m
a(i,j)=input('Enter the elements of 1st matrix = ')
end
end
disp('The 1st matrix is ',a)
n = input('Enter thr no of rows of 2nd matrix = ')
m = input('Enter the no of columbs of 2nd matrix = ')
for i=1:n
for j=1:m
b(i,j)=input('Enter the elements of matrix = ')
end
end
disp('The 2nd matrix is ',b)
for i=1:n
for j=1:n
c(i,j)=0
for k=1:n
c(i,j)=c(i,j)+(a(i,k)*b(k,j))
end
end
end
disp('Matrix after multiplication is',c)

Output :
To Find Transpose of Matrix :

//Transpose of matrix_(1907004)_Abhishek Sudan


clc
clear
n = input('Enter the no of rows of 1st matrix = ')
m = input('Enter the no of columbs of ist matrix = ')
for i=1:n
for j=1:m
a(i,j)=input('Enter the elements of 1st matrix = ')
end
end
disp('The matrix is ',a)
for i=1:n
for j=1:m
b(j,i)=a(i,j)
end
end
disp('Transpose of matris is ',b)
disp('Transpise of matrix through inuild command is ',a')
Output :

To find the matrix is Orthogonal or not :


//To find matrix is orthogonal or not_(1907061) _Naresh kumawat
clc
clear
n = input('Enter the no of rows of 1st matrix = ')
m = input('Enter the no of columbs of ist matrix = ')
for i=1:n
for j=1:m
a(i,j)=input('Enter the elements of matrix = ')
end
end
disp('The matrix is ',a)
if (a*a'==eye(n,m)) then
disp('Entered matris is orthogonal')
else
disp('Entered matrix is not orthogonal')
end

Output :

You might also like