You are on page 1of 3

Control system lab mechelectronics department/level 3

EXPERIMENT NO.2
Object: Determine transpose, inverse values of given matrix using MATLAB. Also find the
rank, determinant, Eigen values, Eigen vector, trace and ortho-normal of the same matrix.
1 10 20
A= [2 5 7]
7 8 9
Apparatus Used: MATLAB with Control System Toolbox.
Introduction of matrix: The matrix notation usually simplifies the complex mathematical
expression and makes solution of problems much easier to handle and manipulate. In
MATLAB,
a matrix is a rectangular array of real or complex numbers. Matrices with only one row or with
only one column are called row and column vectors respectively. A matrix having only one
element is called a scalar. Some operations are performed on the matrices as given below.

1- Transpose: The transpose a matrix is a new matrix in which the rows of the original

matrix are the columns of the new matrix.


Syntax: B=transpose (A)
This syntax returns the transpose of a given matrix A.
2- Inverse: The matrix B is the inverse of the matrix A when the two matrices are

multiplied and the product is an identity matrix. Both matrices A & B must be square and
the order of multiplication can be AB or BA.
AB= BA = I
Syntax: B=inv (A)
3- Rank: The rank function provides an estimate of the number of linearly independent

rows or columns of a full matrix


Syntax: k = rank (A)
This syntax returns the number of singular values of A.
Control system lab mechelectronics department/level 3
4- Determinant: A determinant is a scalar computed from the entries in a square matrix.

Syntax: d = det (A)


This syntax returns the determinant of the square matrix A.
5- Eigen Value & Eigen Vector:

Syntax: Lamda=eig(A)
An eigenvalue and eigenvector of a square matrix A are, respectively, a scalar λ and a
nonzero vector υ that satisfyAυ = λυ.
With the eigenvalues on the diagonal of a diagonal matrix Λ and the corresponding
eigenvectors forming the columns of a matrix V, you have
AV = VΛ.
If V is nonsingur
6- Eigen Vector:

Syntax: [V, D]=eig(A)


7- Trace: Sum of diagonal elements.

Syntax: C = trace (A)


This syntax returns the sum of the diagonal elements of the matrix A.
8- Orthonormal: Range space of matrix.

Syntax: B = orth (A)


The syntax of orthonormal basis for the range of A. The columns of B span the same
space as the columns of A, and the columns of B are orthogonal, so that B'*B =
eye(rank(A)). The number of columns of B is the rank of A
Program:
clearall
clc
A=[1 10 20;2 5 6;7 8 9]; %Take any matrix A
Determinant_A=det(A); %Determinant of Matrix A
Rank_A=rank(A); %Rank of Matrix A
Control system lab mechelectronics department/level 3
Trace_A=trace(A); %Trace of Matrix A
Square_A=A*A; %Square of Matrix A
Transpose_A=transpose(A); %Transpose of Matrix A
Inverse_A=inv(A); %Inverse of Matrix A
Eigenvalue_A=eig(A); %Eigen Values of Matrix A
[v x]= eig(A); %Eigen Vector of Matrix A
Orthogonal__A=orth(A); %Orthogonal Matrix of Matrix A
Results:All the operations have been performed taking a 3*3 matrix A using MATLAB
and
results have been seen on the command window

Eng /Abdulsalam alhaboob

You might also like