Addition & multiplication of two matrices in PHP

Addition & multiplication of two matrices in PHP

15CSL77
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT


program

Write the PHP programs to do the following:   
  1. Find the transpose of a matrix. 
  2. Multiplication of two matrices. 
  3. Addition of two matrices.

Basic Concepts

If a[i][j] and b[i][j] is two matrix then:
  1. Transpose of a[i][j] will be a[j][i]
  2. Addition of matrix will be a[i][j]+b[i][j]
  3. Mutiplication :- for multiplication we cant multiply directley we have to create new matrix supose result[i][j]=0 which will be the result of product of two matrix if                          Result[i][j]+=a[i][k]*b[i][k]

Addition & multiplication of two matrices in PHP Code



Output:

Addition & multiplication of two matrices in PHP
Addition & multiplication of two matrices in PHP output

Addition & multiplication of two matrices in PHP Vide Tutorial


No comments:

For Query and doubts!

Powered by Blogger.