Question: Q 1 . Matrix Multiplication [ 8 ] : import numpy as np Create the following matrices in Numpy x = [ 2 3 4

Q1. Matrix Multiplication
[8] :
import numpy as np
Create the following matrices in Numpy
x=[23467]
5
Y=[3261]
0
5
[37]:X = np.array([[2,3,4],[5,6,7]])
print(X)
Y = np.array([[3,2],[5,6],[0,1]])
print(Y)
[[2,3,4
Q3: Solve systems of linear equations
Consider a system of linear equations:
-x1+3x2+4x3=7
3x1+2x3=2
4x1-5x2=-4
# Define the matrix A as the coefficients of the linear equations
A = None # Replacing None with your code.
# Write your code to define C as the right hand side of the linear equations.
C = None # Replacing None with your code.
print(A)
print(C)
Q3: Solve systems of linear equations
Consider a system of linear equations:
-x1+8x2+4x3=7
3x1+2x3=2
4x1-5x2=-4
[29]: * Define the matrix A as the coefficients of the linear equations
A = None * Replacing None with your code.
Write your code to define C as the right hand side of the linear equations.
C = None * Replacing None with your code.
print(A)
print(C)
None
None
[30]: # Write your code to calculate the solution of the linear equations using the
matrix inverse method. Do not directly use np.linalg. solve function.
x= None % write your code by replacing None with your code.
print (x)
None
[8]:
fve can also use np.linalg.solve function to solve the system of linear equations
XI = None # write your code to solve the equation with
tnp.linalg.solve function
print(X1)
None
Q 1 . Matrix Multiplication [ 8 ] : import numpy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!