Is it Possible? - Matrix multiplication

Is it possible to extract the diagonal elements of a matrix into a vector by using matrix multiplication only? If it is possible show how ;)

I'm curious how long it will take for you guys to answer this. Btw, no element by element multiplication is allowed.

5 Comments
 

Look, I don't know how to do it in excel because I refuse to lower my standards to it, but in general

Ax = b

Take a 2-by-2 matrix A, where a_ij is the ith row and jth column element (i,j =2). Then you want b = [a_11 a_22]^T (T is the transpose). In this case,

Ax = b (A^-1)Ax = (A^-1)b

hence x = (A^-1)b

So matrix A has to be invertible. If you can find the inverse of a matrix using your software, then simply multiply this inverse matrix by the vector of diagonals to get this vector x, which you need to multiply to the vector of diagonals.

Just Do It
 
Best Response
maximumlikelihoodLook, I don't know how to do it in excel because I refuse to lower my standards to it, but in general

Ax = b

Take a 2-by-2 matrix A, where a_ij is the ith row and jth column element (i,j =2). Then you want b = [a_11 a_22]^T (T is the transpose). In this case,

Ax = b (A^-1)Ax = (A^-1)b

hence x = (A^-1)b

So matrix A has to be invertible. If you can find the inverse of a matrix using your software, then simply multiply this inverse matrix by the vector of diagonals to get this vector x, which you need to multiply to the vector of diagonals.

That's pretty much the way to do it, but in this case I am not allowed to use any 'find' commands, nor am I able to use any other commands that create a diagonal matrix (all elements besides the diagonal are zero). I am only allowed to use the multiplication of matrices, and am constrained by the number of multiplications I can perform.

 

Nostrum velit tempora voluptatum sed et. Ratione beatae quia optio perspiciatis ipsam.

Quia rem possimus eum velit cupiditate alias. Occaecati repellat nesciunt dignissimos. Est perferendis quos necessitatibus dolorem. Aut laudantium voluptate velit cupiditate fugiat dignissimos perspiciatis. Vitae impedit quia earum et nobis quae dolorum. Et dolorem aperiam facere repudiandae ut voluptates minima.

Voluptas aut fuga soluta quisquam est nihil qui. Autem rerum rerum pariatur. Dolorem qui rerum quam rerum. Neque quas velit laborum quae quos voluptatem.

Follow the shit your fellow monkeys say @shitWSOsays Life is hard, it's even harder when you're stupid - John Wayne

Career Advancement Opportunities

September 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.4%
  • Goldman Sachs 01 97.9%
  • Morgan Stanley 07 97.3%

Overall Employee Satisfaction

September 2026 Investment Banking

  • Moelis & Company No 99.5%
  • Morgan Stanley 02 98.9%
  • Evercore 01 98.4%
  • Banco Santander 02 97.9%
  • BMO Capital Markets 12 97.3%

Professional Growth Opportunities

September 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 07 98.4%
  • Goldman Sachs 01 97.9%
  • JPMorgan No 97.3%

Total Avg Compensation

September 2026 Investment Banking

  • Vice President (16) $429
  • Associates (51) $260
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (26) $182
  • Intern/Summer Associate (15) $159
  • 1st Year Analyst (84) $151
  • Intern/Summer Analyst (76) $101
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
BankonBanking's picture
BankonBanking
99.0
3
kanon's picture
kanon
99.0
4
Secyh62's picture
Secyh62
99.0
5
Betsy Massar's picture
Betsy Massar
98.9
6
CompBanker's picture
CompBanker
98.9
7
dosk17's picture
dosk17
98.9
8
GameTheory's picture
GameTheory
98.9
9
DrApeman's picture
DrApeman
98.9
10
numi's picture
numi
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”