Site icon EaseMyPhD

Simple FORTRAN program to define & manipulate matrices- explanation made easy

Define and Display a Matrix

FORTRAN program to define and display a matrix

The program reads the first input as (1,1), the second input as (1,2), and the third one as (1,3). This means that first the loop runs for I=1 for all values of J. Then, it runs for I=2 and then for I=3.

Adding two matrices

FORTRAN program to add two matrices

For addition, size of two matrices must be same, i.e. same number of rows and columns.

Multiplying square matrices

FORTRAN program to multiply two 3*3 matrices

For multiplication, number of columns in the first matrix must match the number of rows in the second matrix.

Exit mobile version