Metadata-Version: 2.1
Name: matSN
Version: 0.0.1
Summary: Basic Operations For Matrices
Author-email: Shanmuga Nathan V <Shanmu2224@gmail.com>
Project-URL: Homepage, https://github.com/pypa/sampleproject
Project-URL: Bug Tracker, https://github.com/pypa/sampleproject/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: License.txt

## SNMATRICES
-------------------------------------------------------------------------------
- These Operations will work only ,if both the matrices are of same order
-----------------------------------------------------------------------------------

## Matrix_Operations: 
## MODULE NAME:operations.py

1)Getting input matrix:
Function:input_matrix(Number of rows,Number of columns)

2)Matrix Addition:
Function:matrix_addition(matrixA,matrixB)

3)Matrix Subraction
Function:matrix_subraction(matrixA,matrixB)

-4)Matrix Multiplication:
-Function:matrix_multiplication(matrixA,matrixB)

## SOURCE CODE

## MATRIX ADDITION
def matrix_addition(A,B):
    mat_addition=[]
    for i in range(len(A)):
        c=[]
        for j in range(len(B[0])):
            c.append(A[i][j]+B[i][j])
        mat_addition.append(c)
    print('Matrix Addition=')
    print(mat_addition)

## MATRIX SUBRACTION
def matrix_subraction(A,B):
    mat_subraction=[]
    for i in range(len(A)):
        c=[]
        for j in range(len(B)):
            c.append(A[i][j]-B[i][j])
        mat_subraction.append(c)
    print('Matrix Subraction=')
    print(mat_subraction)

## MATRIX MULTIPLICATION
def matrix_multiplication(A,B):
    mul_result=[]
    for i in range(len(A)):
        c=[]
        for j in range(len(B[0])):
            result=0
            for k in range(len(B)):
                result+=A[i][k]*B[k][j]
            c.append(result)
        mul_result.append(c)
    print('Matrix Multiplication=')
    print(mul_result)

## INPUT MATRIX
def input_matrix(rows,columns): 
    A=[]
    print('Enter the entries row wise:')
    a=[]
    for i in range(rows):
        a=[]
        for j in range(columns):
            a.append(int(input()))
        A.append(a)
    print('Input Matrix=')
    print(A)

##LICENSE
MIT
