# Nodal analysis and using a matrix to solve circuits

#### Kelko

Joined Oct 1, 2020
33
So in the picture attached there’s two questions the first one asks to use nodal analysis to prove that YV = I where Y, V AND I are all matrices. I have no idea how to set up the matrices or read them or use those matrices for question 2 any guidance would be amazing. Also for the nodal analysis when finding V1 and the other nodes I’m not sure what way to go around that either. Like for V1 is that equal to I1 x Z1 or is it different?

#### Attachments

• 1.3 MB Views: 18

#### The Electrician

Joined Oct 9, 2007
2,936
The first thing you better do is learn how matrix multiplication works:

#### Kelko

Joined Oct 1, 2020
33
I understand matrices and matrix multiplication I just don’t know how to apply it this tbh. Am I just being stupid?

#### Kelko

Joined Oct 1, 2020
33
Yeah I’d love to be able to use the mesh method but sadly I have to use nodal analysis :/

#### The Electrician

Joined Oct 9, 2007
2,936
I understand matrices and matrix multiplication I just don’t know how to apply it this tbh. Am I just being stupid?
For the first part they want you to write out the nodal equations in the standard way, assuming that the bottom node is the reference node, and then expand the matrix equation YV=I by multiplying the matrix Y times the column matrix V giving a column matrix as a result. Set the individual elements of that result equal to the individual elements of the I column matrix and verify that that result is identical to the result you got for the nodal equations obtained in the standard way.

For the second part, plug the numerical values from Figure 3 into the matrix equation of part 1 and solve it. The voltage across the 3 ohm resistor will be just the value of the voltage V3

#### Kelko

Joined Oct 1, 2020
33
for part 2 to solve the equation wouldn't i need to find out was I1 and I2 are first? otherwise im left still with 2 unknowns in the answer

#### Kelko

Joined Oct 1, 2020
33
Hey I posted about this already but I thought this would make it clearer. I don’t really know how to find the voltage across the 3 ohm resistor. I know I should fill in the appropriate admittance’s for the Y matrix but after that I have no idea

#### Attachments

• 1 MB Views: 12

#### The Electrician

Joined Oct 9, 2007
2,936
for part 2 to solve the equation wouldn't i need to find out was I1 and I2 are first? otherwise im left still with 2 unknowns in the answer
Until you asked this question I hadn't noticed that in part 2 the current sources are replaced with voltage sources. Part 2 says to use the matrix equation from part 1, but that equation assumed current sources, not voltage sources, so I don't think the Y matrix from part 1 is directly applicable to part 2.

Do you know how to write nodal equations for the circuit in part 2? You could then put them in matrix format and solve the circuit using matrix arithmetic.

#### Kelko

Joined Oct 1, 2020
33
Until you asked this question I hadn't noticed that in part 2 the current sources are replaced with voltage sources. Part 2 says to use the matrix equation from part 1, but that equation assumed current sources, not voltage sources, so I don't think the Y matrix from part 1 is directly applicable to part 2.

Do you know how to write nodal equations for the circuit in part 2? You could then put them in matrix format and solve the circuit using matrix arithmetic.
ill be completely honest i think i've stared at this question for so long i can barely think about doing the nodal equations, so V1 would be 8V and V4 would be -1V? but in terms of putting that into a matrix how would i do that?

#### Tesla23

Joined May 10, 2009
536
It's a terrible question.

It's not worth the effort to try to solve it in matrix format, but from part (a) you have the nodal equations for nodes 2 and 3 (these are the middle two equations that correspond to the '0' entries in the I vector). As in Part (b) you are given V1 and V4, just solve these two equations for the unknowns V2 and V3 (or actually just V3 as that is what you want) using the given values for V1 and V4.

#### The Electrician

Joined Oct 9, 2007
2,936
It's a terrible question.

It's not worth the effort to try to solve it in matrix format, but from part (a) you have the nodal equations for nodes 2 and 3 (these are the middle two equations that correspond to the '0' entries in the I vector). As in Part (b) you are given V1 and V4, just solve these two equations for the unknowns V2 and V3 (or actually just V3 as that is what you want) using the given values for V1 and V4.
It's worth the effort if that's what the problem requires and if the student wants to get credit for following instructions, isn't it?

#### The Electrician

Joined Oct 9, 2007
2,936
ill be completely honest i think i've stared at this question for so long i can barely think about doing the nodal equations, so V1 would be 8V and V4 would be -1V? but in terms of putting that into a matrix how would i do that?
Did you actually carry out the operations called for by part1? You haven't shown that work and we who would help you are left wondering if you have. Doing part 1 will give you a feel for how the nodal equations are put into matrix form. Each row of the Y matrix consists of the coefficients of one of the nodal equations.

For part 2 you need two equations dealing with the two voltage sources, namely V1 = 8 and V4 = -1

The question is how to get those into matrix form. Imagine that the first row becomes [ 1 0 0 0 ] and the first element of the I column matrix becomes 8. Then if you multiply out YV=I like you did in part 1 that first row will produce an equation 1*V1 = 8. There will be 3 more equations produced by the matrix multiplication, or course. So that is how you put the V1 = 8 equation into the matrix; can you see how you would put V4 = -1 into the Y matrix? You will have to modify the last row of Y and the last element of I. Show us what you get.

#### Tesla23

Joined May 10, 2009
536
It's worth the effort if that's what the problem requires and if the student wants to get credit for following instructions, isn't it?
All part (b) says is

unless the student has covered a way of doing this - and I'm not aware of a standard way, then any way is fair game.

This matrix equation represents 4 equations in the 4 unknown voltages, but now 2 of them are known, So 2 of the equations are now redundant, all I'm suggesting is that the student uses the two remaining ones and solve the fairly trivial problem of 2 simultaneous equations. He can write them down directly from the matrix equation from part (a), so he is using that equation.

#### The Electrician

Joined Oct 9, 2007
2,936
All part (b) says is
View attachment 232766

unless the student has covered a way of doing this - and I'm not aware of a standard way, then any way is fair game.

This matrix equation represents 4 equations in the 4 unknown voltages, but now 2 of them are known, So 2 of the equations are now redundant, all I'm suggesting is that the student uses the two remaining ones and solve the fairly trivial problem of 2 simultaneous equations. He can write them down directly from the matrix equation from part (a), so he is using that equation.
Part (b) says more than what you've quoted. The problem told the student to use a matrix equation to find a voltage in the network; this means "solve the matrix equation".

There's not much point in learning to put the nodal equations in matrix form without also learning to solve matrix equations.

Of course there are standard ways of solving matrix equations, e.g.:

#### Tesla23

Joined May 10, 2009
536
Part (b) says more than what you've quoted. The problem told the student to use a matrix equation to find a voltage in the network; this means "solve the matrix equation".

There's not much point in learning to put the nodal equations in matrix form without also learning to solve matrix equations.

Of course there are standard ways of solving matrix equations, e.g.:
Use means use. You can argue semantics, I look forward to hearing the solution.
My guess is the instructor intended to draw current sources in part (b).

#### The Electrician

Joined Oct 9, 2007
2,936
Use means use. You can argue semantics, I look forward to hearing the solution.
My guess is the instructor intended to draw current sources in part (b).
In post #11 you say " It's not worth the effort to try to solve it in matrix format..." This shows that you know the student is supposed to solve it in matrix format.

#### MrAl

Joined Jun 17, 2014
10,606
There is a marked difference in using a matrix method vs using just plain simultaneous equations. A matrix method requires, well, knowing how matrix methods work in order to arrive at a solution.
To quote part of the first post in this thread:
"So in the picture attached there’s two questions the first one asks to use nodal analysis to prove that YV = I where Y, V AND I are all matrices."

The part that says, "where Y, V, and I are all matrices" tells me right away that they want the student to use matrix math, otherwise they would have said something like:
"use nodal analysis"