Python Forum
How to multiply a matrix with herself, until the zero matrix results
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to multiply a matrix with herself, until the zero matrix results
#1
Hi there!

I'm not quite sure how to code the following problem:
I have to multiply a given matrix A with herself that often, until the zero matrix results.

The matrix A is the following (using numpy as np):
A = np.array([[2,2,2,2,-4], [7,1,1,1,-5], [1,7,1,1,-5], [1,1,7,1,-5], [1,1,1,7,-5]])

Could it be the while loop? But I haven't succeeded yet.
Reply


Messages In This Thread
How to multiply a matrix with herself, until the zero matrix results - by peanutbutterandjelly - May-02-2021, 04:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  help with scrolling text on RGB Matrix Foutsy 3 266 Apr-09-2024, 09:00 PM
Last Post: deanhystad
  Help with Python Script to generate SVG Dot Matrix Pattern for LED Light Guide iamrickm 2 756 Aug-25-2023, 06:07 PM
Last Post: iamrickm
  Check if two matrix are equal and of not add the matrix to the list quest 3 823 Jul-10-2023, 02:41 AM
Last Post: deanhystad
  Print confusion matrix MrSonoa 1 910 Apr-20-2023, 04:17 PM
Last Post: farshid
  Can't modify a simple matrix Lewkiy 3 910 Feb-05-2023, 02:59 PM
Last Post: Lewkiy
  matrix multiplication term by term karolina 1 827 Dec-10-2022, 10:11 AM
Last Post: Gribouillis
  using StandardScaler on a heterogenous matrix. Led_Zeppelin 0 934 Jun-23-2022, 05:24 PM
Last Post: Led_Zeppelin
  Loading an array into a matrix Scott 1 1,178 Jun-01-2022, 07:08 PM
Last Post: paul18fr
  Numpy error while filling up matrix with Characters august 4 1,853 Apr-13-2022, 10:28 PM
Last Post: august
  matrix number assignement to the random indices juniorcoder 4 1,920 Feb-19-2022, 02:18 PM
Last Post: juniorcoder

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020