Note that,

```
library(igraph)
g <- graph(~ A--B)
gll <-make_line_graph(make_line_graph(g))
```

gives an empty graph. where I would expect g.

See also:

(1) https://igraph.org/c/pdf/latest/igraph-docs.pdf, page 651.

(2) igraph R manual pages

Note that,

```
library(igraph)
g <- graph(~ A--B)
gll <-make_line_graph(make_line_graph(g))
```

gives an empty graph. where I would expect g.

See also:

(1) https://igraph.org/c/pdf/latest/igraph-docs.pdf, page 651.

(2) igraph R manual pages

The result makes sense to me:

- g has a single edge
- Therefore L(g) has a single vertex, and no edges
- Since L(g) has no edges, L(L(g)) cannot have any vertices

Why do you think L(L(g)) should be the same as g?

However, some things in how line graphs are computed seem inconsistent to me. I just opened this issue: Should loop edges be considered self-adjacenct for the purpose of line-graph computation? · Issue #2524 · igraph/igraph · GitHub

I was thinking as follows:

Let `g <- graph(~ a--b, simplify=FALSE)`

.

I expected *L(g)* to be a single vertex with two loops for each distinct endpoint in g an edge, like:

`Lg <- graph(~ ab--ab, ab--ab, simplify=FALSE)`

. Strictly speaking, this is not a simple graph but a pseudograph.

By applying *L*(Lg), I expected to retrieve g.

At a later point I learned that loops in simple undirected graphs are not part of the standard definition of line graphs.

See:

(1) line_graph — NetworkX 3.2.1 documentation.

(2) Spectra of Graphs, p.18.