Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Write a Perl program to find the inverse of a #4745

Merged
merged 6 commits into from
Dec 1, 2023

Conversation

Shreyash3110
Copy link
Contributor

📑 Description

A Perl program to find the inverse of matrix A
copilot:summary

🐞 Related Issue

Closes https://github.com/codinasion/codinasion/issues/3937

📋 Explanation of changes

1)Subroutine Definition (matrix_inverse):
-The program defines a subroutine named matrix_inverse that takes a square matrix as input and returns its inverse.
-It first checks if the matrix is square. If not, it throws an error.
-The subroutine uses Gauss-Jordan elimination to find the inverse of the matrix.

2)Matrix Augmentation:
-The input matrix is augmented with an identity matrix to create an augmented matrix.

3)Gauss-Jordan Elimination:
-The program performs Gauss-Jordan elimination to transform the augmented matrix into the form [I | A^(-1)], where I is the identity matrix and A^(-1) is the inverse matrix.

4)Extracting Inverse Matrix:
-The inverse matrix is then extracted from the augmented matrix.

5)Example Usage:
-An example 3x3 matrix is provided, and the matrix_inverse subroutine is called with this matrix.
-The program then prints the resulting inverse matrix.

copilot:walkthrough

copilot:poem

@Shreyash3110 Shreyash3110 requested review from a team, anandfresh and brundabharadwaj and removed request for a team November 26, 2023 22:53
Copy link

vercel bot commented Nov 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
codinasion-beta ✅ Ready (Inspect) Visit Preview Nov 26, 2023 10:54pm

Copy link

vercel bot commented Nov 28, 2023

@harshraj8843 is attempting to deploy a commit to the Codinasion Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

changeset-bot bot commented Dec 1, 2023

⚠️ No Changeset found

Latest commit: f8739a0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@harshraj8843 harshraj8843 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing 🤗

@harshraj8843 harshraj8843 merged commit e12b6dc into codinasion-archive:master Dec 1, 2023
2 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Program]: Write a Perl program to find the inverse of a
4 participants