Phys2431 Python Programming for Linear Algebra-1
Phys2431 Python Programming for Linear Algebra-1
Pre-requisite None
Co-requisite None
Course Description:
This course is designed to provide a comprehensive understanding of linear algebra concepts and their implementation using
Python. The course covers fundamental Python programming skills and introduces the powerful NumPy library for numerical
computing.
Introduction to Python programming language, Basic Python syntax and data types, Introduction to NumPy library for numerical
computing, NumPy arrays and basic operations, Broadcasting in NumPy, NumPy functions for linear algebra operations.
Introduction to vectors and vector spaces, Vector representation in NumPy, Vector addition, subtraction, and scalar
multiplication, Dot product and cross product, Norms and distance measures, Applications of vectors in Python
Introduction to matrices and matrix representation in NumPy, Matrix addition, subtraction, and scalar multiplication, Matrix
multiplication and its properties, Transpose and inverse of matrices, Solving linear equations using matrices, Eigenvalues and
eigenvectors
Understanding linear transformations, Transformation matrices and their properties, Compositions of linear transformation,
Kernel and image of linear transformations, Applications of linear transformations in Python.
Singular Value Decomposition (SVD), Principal Component Analysis (PCA), Applications of linear algebra in machine learning,
Implementing regression using linear algebra, Case studies and projects using Python and linear algebra.
List of Experiments
S.no Topic Type
Write a program to demonstrate array creation, indexing, slicing, and basic operations
1 Exercise
(addition, subtraction, multiplication, division).
2 Write a program to illustrate the concept of broadcasting in NumPy with practical examples. Exercise
(c) - page 1 of 3
Write a program to perform basic linear algebra operations (dot product, cross product, matrix
3 Exercise
multiplication) using NumPy functions
Write a program to represent vectors using NumPy arrays and perform vector addition,
4 Exercise
subtraction, and scalar multiplication
Write a program to compute different norms (L1, L2) and distance measures (Euclidean,
5 Exercise
Manhattan) between vectors using NumPy
Write a program to demonstrate an application of vectors, such as calculating the projection of
6 Exercise
one vector onto another or determining the angle between vectors
Write a program to create and manipulate matrices using NumPy, including matrix addition,
7 Exercise
subtraction, and scalar multiplication.
8 Write a program to calculate the transpose and inverse of matrices using NumPy Exercise
Write a program to solve a system of linear equations using matrices (e.g., using
9 Exercise
numpy.linalg.solve).
10 Write a program to compute the eigenvalues and eigenvectors of a matrix using NumPy Exercise
Write a program to demonstrate properties of transformation matrices (e.g., rotation, scaling,
11 Exercise
reflection).
12 Write a program to perform Singular Value Decomposition on a matrix using NumPy Exercise
13 Write a program to implement PCA using NumPy for dimensionality reduction Exercise
Write a program to illustrate an application of linear algebra in machine learning, such as
14 Exercise
feature scaling or orthogonalization
15 Write a program to implement linear regression using the normal equation approach Exercise
16 Write a program to analyze a dataset using PCA for dimensionality reduction and visualization Exercise
Textbook(s):
1. Eric Matthes, Python Crash Course: A Hand: A Hands-On, Project-Based Introduction to Programming, 2, No Starch
Press, 2019 ,9781593277390
2. Ivan Idris, NumPy Beginner's Guide , Packt Publishing Limited, 2013 ,9781782166085
3. III Bau, David , Lloyd N. Trefethen, Numerical Linear Algebra, 25, Society for Industrial & Applied, 2022
Reference(s):
Course Outcomes:
1. Apply vector operations and understand their applications in Python
2. Perform matrix operations and solve linear equations using NumPy
3. Analyze and implement linear transformations using transformation matrices
4. Explore advanced topics such as SVD and PCA, and understand their significance
5. Successfully complete case studies and projects demonstrating practical applications of Python and linear algebra
POs PSOs
CO 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4
1 2 1 2 1 1 3 3 2 3
2 2 1 2 1 1 3 3 2 3
3 2 1 2 1 1 3 3 2 3
4 2 1 2 1 1 3 3 2 3
5 2 1 2 1 1 3 3 2 3
(c) - page 2 of 3
APPROVED IN MEETINGS HELD ON:
BOS : 19-06-2024 Academic Council Number: 30 Academic Council : 04-07-2024
SDG Justification(s):
SDG 4: The modules and topics mentioned in this course are designed to ensure all-inclusive and thorough education with
equity for all persons and promote learning opportunities. SDG 9: The modules and topics mentioned in this course are
designed to ensure scientists build resilient infrastructure that promotes inclusive and sustainable industrialization and fosters
innovation
(c) - page 3 of 3